by Stefan Wolfsheimer <wolfs019@[EMAIL PROTECTED]
>
Apr 13, 2004 at 03:38 PM
Sonia wrote:
> Why does C++ return 0 and Visual C++ return 1 when I execute this
> program? Why the difference if they are both MS products?
I don't know which compiler exactly you mean with "C++"?
I guess, you want to compare 2 strings.
Try the function strcmp in <string.h> or more c++-like:
#include <iostream>
#include <string>
using namespace std;
void main()
{
cout<< string("123")<= string("89") <<endl;
}
If you compare "123" with "84", you compare 2 pointers of char (char*).
String constants are pointer of char.
----
Stefan