Results 1 to 7 of 7

Thread: <>

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    what is not equal to in C++? sorry I don't have any help files...for C++ or vb

  2. #2
    Junior Member
    Join Date
    Oct 2000
    Posts
    19
    !=

  3. #3
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    !=

    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.

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    for some reason I get an error with !=

    that what I have been using but its not working

    btw its VB++ 6

    thanks sam

  5. #5
    Lively Member rekcus's Avatar
    Join Date
    Jan 1999
    Location
    Kuala Lumpur
    Posts
    122

    wierd.....

    What's VB++6?

    != should be correct. Maybe you can post your code
    for us to look it over.


    penyou!

    "The code bytes.."

  6. #6
    Guest
    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


  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    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
  •  



Click Here to Expand Forum to Full Width