Mail Archives: djgpp/1998/05/27/07:08:57
On Wed, 27 May 1998, Clint Allen wrote:
> if (argv[1] == "/nts")
If you are compiling in C this is incorrect: use if (strcmp(argv[1],
"/nts") == 0) instead;
You are using C++ (as // comments suggest) the == operator for array of
char it shouldn't work as you expect. I don't know C++ very well but
string comparison could be made with == operator if you declare the
arguments of the == operator as string class objects (I really don't know
how you can declare them, but for a C++ programmers should be very
simple).
I think that your code is not comparing the 'strings' at all but something
else I can't tell what.
Hope to be right.
Federico
- Raw text -