Are these valid operators

This is a discussion on Are these valid operators within the C Programming forums, part of the General Programming Boards category; Are <<, >> and ?? valid operators within a c program (strictly c only, I know that they can be ...

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    98

    Are these valid operators

    Are <<, >> and ?? valid operators within a c program (strictly c only, I know that they can be used in c++).

    I was asked to look at some code which seemed to be some kind of debug function, but which contained these operators, and I didn't recognise them as valid within C code. Any comments?

  2. #2
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    << and >> are left and right bitwise-shift. I have no idea what ?? is.
    Away.

  3. #3
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    perhaps you mean "?" which is the inline ternary operator. It's pretty much the same thing as an if/else.

    condition ? IfTrue : IfFalse;

    just gives you a quick-short way of doing a conditional value.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  4. #4
    Registered User
    Join Date
    Oct 2002
    Posts
    98
    Thanks. From what you've described, the code was using tr-graphs. I'd never heard of them before.

    Cheers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bolean Operators hurt my head. (Trouble understanding) :(
    By Funcoot in forum C++ Programming
    Replies: 3
    Last Post: 01-20-2008, 07:42 PM
  2. recursion error
    By cchallenged in forum C Programming
    Replies: 2
    Last Post: 12-18-2006, 09:15 AM
  3. operators???
    By arjunajay in forum C++ Programming
    Replies: 11
    Last Post: 06-25-2005, 05:37 AM
  4. Operators
    By George in forum C++ Programming
    Replies: 3
    Last Post: 04-02-2003, 07:35 PM
  5. Azbia - a simple RPG game code
    By Unregistered in forum Game Programming
    Replies: 11
    Last Post: 05-03-2002, 07:59 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21