|
Thread: <>
-
Dec 14th, 2000, 09:37 PM
#1
Thread Starter
Frenzied Member
what is not equal to in C++? sorry I don't have any help files...for C++ or vb
-
Dec 14th, 2000, 09:56 PM
#2
Junior Member
-
Dec 14th, 2000, 09:58 PM
#3
Frenzied Member
!=
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.
If it wasn't for this sentence I wouldn't have a signature at all.
-
Dec 14th, 2000, 10:40 PM
#4
Thread Starter
Frenzied Member
for some reason I get an error with !=
that what I have been using but its not working
btw its VB++ 6
thanks sam
-
Dec 15th, 2000, 03:19 AM
#5
Lively Member
-
Dec 15th, 2000, 08:07 AM
#6
Code:
#include <iostream.h>
int main()
{
int a = 1;
int b = 2;
if (a != b) cout << "not equal";
return 0;
}
try that..
it works for me 
-
Dec 15th, 2000, 03:59 PM
#7
Thread Starter
Frenzied Member
Sorry I meant VC++6 not VB++6
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|