I'm actually running a little page with $REMOTE_ADDR
The problem is that any computer with NT4 or W9x on it have its own IP well recorded in the $REMOTE_ADDR global.
But all W2k computer instead return 127.0.0.1 as remote adress....
Can someone save me??
I have a C++ server that keep data on users using the chat applet (username + ip + room).
Two client can speak to each other just by sending message to the target IP (other connected, recipient of the message)
The problem is that ip resolution is just impossible throught Proxy and Firewall...
I've to class:
class A
{
public:
void start();
void stop();
void calling_function();
}
class B
{
public:
void foo(void (*start)(), void (*stop)());
}
This may seem stupid, but those are C program part transformed in classes.
My question is:
Before, only class B exist, and this work...
OOps :(
I also don't think that the pre-compiler will love the
#define BASEPORT 0x3FC /*com 1 */
#define BASEPORT 0x2FC /*com 2 */
Both BASEPORT definition may be not allowed.
Try to use 2 different name like BASEPORT_COM_1 and _COM_2.
I do not have gcc but I can see one problem.. And this may solve all others error :)
You write:
#define BASEPORT 0x3FC /*com 1 */
define BASEPORT 0x2FC /*com 2 */ // <- Miss a '#'
Correction
#define BASEPORT 0x3FC /*com 1 */
#define BASEPORT 0x2FC /*com 2 */
I think the question is "When I'm on the Internet and viewing some sites ill-developped. How do I bypass the automatic error detection of VisualStudio?"
The answer is "I don't know"
Hum..
What I have not speak about (or maybe I'm not as clear as needed :p): My project have a special aspect.
TProgram call all others class
CClass1 is a class defining one aspect of the game, like the car pilotes will uses
CClass2 is a class defining one aspect of the game, like the car...
Hum.. already tried..
The problem is: I need it in different class, and the first class call activate the "#define" clause, preventing others class to use the defined object..
I want a SINGLE instance of my objet GameLog and SysLog, not to redefine them into each class :( :(
Sorry...
I have quite a problem:
I use a log class called TLog, whith a constructor:
TLog(bool p_view, char* p_insert, char* p_folder, char* p_file_name);
P_view: On screen True, else writen in file
p_insert: char* to be inserted on the beginning on each line.
p_folder: folder where to write the log...
If I try to use the ofstream.h library, I get the following error at the compilation:
<<
d:\oracle\ora81\oci\include\oratypes.h(278) : error C2378: 'text' : redefinition; symbol cannot be overloaded with a typedef
c:\program files\microsoft visual studio\vc98\include\fstream.h(161) : see...
Hem.. now I have the recurrent problem..
It write "Syslog " each time I use the operator <<..
Like in l_log << "Test" << 6548;
Result: Syslog TestSyslog 6548..
*Sob :)*
SOLVED:
void TFichier::operator<<(char* p_string)
{
ofstream l_out("File.txt", ios::out | ios::app);
_donnee = p_chaine; // _donnee is a class value
l_out << "SysLog " << _donnee;
l_sortie.close();
}
Sorry.. it was simple but I miss the point :( :(
lol
Akay.. so I will try again with another explanation (as nothing work :()
I want to creat a fonction/class which accept to use the operator<< with a string like this:
TOutput l_output;
_output.open("test.fichier", ofstream::out | ofstream::app);
_output<< "Output\n"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.