what is not equal to in C++? sorry I don't have any help files...for C++ or vb :)
Printable View
what is not equal to in C++? sorry I don't have any help files...for C++ or vb :)
!=
!=
be careful with = as well,
if (a = b)
is equivilant to
a = b;
if (a)
because a single equals in C++ means assign, and it returns the vlue they're both equal to, use
if (a == b)
you probably knew that but I thought I'd mention it in case you didn't.
for some reason I get an error with !=
that what I have been using but its not working
btw its VB++ 6
thanks sam ;)
What's VB++6?
!= should be correct. Maybe you can post your code
for us to look it over.
try that..Code:#include <iostream.h>
int main()
{
int a = 1;
int b = 2;
if (a != b) cout << "not equal";
return 0;
}
it works for me :)
Sorry I meant VC++6 not VB++6 :rolleyes: