Thread: new keywords

  1. #1
    Shadow12345
    Guest

    new keywords

    I do not know what the following keywords mean. If someone could tell me or point me to a website (don't say search google) I would be very happy...anyway here is the list of new keywords:
    • default
      xor_eq(^=)
      explicit
      asm
      compl (~)
      mutable
      volatile
      auto
      register
      union
      xor (^)


    like i said these are all new C++ keywords and I do not know what they mean...I am pretty sure i haven't ever seen any of these in code, and I do not have the MSDN library right now.
    Last edited by Shadow12345; 07-24-2002 at 12:08 AM.

  2. #2
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542
    Actually, I have those keywords in my book, I guess
    If you want me to write down their meanings and examples of each one, I'll do it
    Thanks
    what does signature stand for?

  3. #3
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571

    Re: new keywords

    Originally posted by Shadow12345
    I do not know what the following keywords mean. If someone could tell me or point me to a website (don't say search google) I would be very happy...anyway here is the list of new keywords:
    • default
      xor_eq(^=)
      explicit
      asm
      compl (~)
      mutable
      volatile
      auto
      register
      union
      xor (^)


    like i said these are all new C++ keywords and I do not know what they mean...I am pretty sure i haven't ever seen any of these in code, and I do not have the MSDN library right now.
    Okay here goes!! I'll try to give a brief description of each. Some of these are not new either...

    default
    This is for switch statements. This keyword has been around a while unless they overloaded it. Anyways, it just means if you this as the last case and no case was found matching the argument it will go into the default case.

    xor_eq(^=)
    bitwise XOR operator. I'm not going to get into that but it the exclusive OR operator.

    explicit
    Disable implicit conversion constructors when using classes.

    asm
    inline assembly code

    compl (~)
    One's complement. This flips every 1 bit to 0 and every 0 bit to 1.

    mutable
    When put before a member variable, this tells the compiler that the data can be modified in a const member function.

    volatile
    This is probably *the* most understood keyword by most C++ programmers. It is poorly documented all around. It's fairly complicated but you use these keyword to tell the compiler the data in the memory location may change at any time without notice.

    Some Examples?
    a) Global variables in a multi-threaded application...
    b) Global variables modified by ISR

    auto
    C++ compilers treat all local variables as auto by default. Basically it gets destroyed at the end of it's scope. Sometimes people use this to clarify scopes but it is optional.

    register
    register keyword. Use this before variables you hope to put inside a CPU's registers. This keyword *asks* to put the variable in a register but does not guarantee it. Try to use these on loop indexes that are used often.

    union
    This is a way to group unlike data using a single name like a structure. The only difference is structure reserves different memory for every member. Union members share the same memory location. Only one member can use it at a time though.

    xor
    Bitwise exclusive OR. Performs exclusive or, don't know what else to say about it...

    Hope this helped you man! Good Luck!

  4. #4
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542
    Yea, that's exactly what I had in my book
    what does signature stand for?

  5. #5
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    Originally posted by Ruski
    Yea, that's exactly what I had in my book
    Ah, those were off the top of my head. I was like 99% sure on them but I was waiting for someone to pop in and call me out on one of them!

  6. #6
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784

    Re: new keywords

    Originally posted by Shadow12345
    I do not know what the following keywords mean. If someone could tell me or point me to a website (don't say search google) I would be very happy...anyway here is the list of new keywords:
    • default
      xor_eq(^=)
      explicit
      asm
      compl (~)
      mutable
      volatile
      auto
      register
      union
      xor (^)


    like i said these are all new C++ keywords and I do not know what they mean...I am pretty sure i haven't ever seen any of these in code, and I do not have the MSDN library right now.
    Why don't you have access to the MSDN library? It is freely available online at:

    www.msdn.microsoft.com/library

  7. #7
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542
    Lol
    what does signature stand for?

  8. #8
    Shadow12345
    Guest
    I thought that you had to subscribe to it and pay money to get the CDs, but I guess I was wrong!

    Thanks all you guys for ur help.

  9. #9
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542
    No problem
    what does signature stand for?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to color certain keywords?
    By Purity in forum Tech Board
    Replies: 5
    Last Post: 10-20-2005, 02:07 PM
  2. super/interface keywords
    By xErath in forum C++ Programming
    Replies: 4
    Last Post: 06-22-2005, 07:06 PM
  3. Google remembering my keywords
    By m712 in forum Tech Board
    Replies: 4
    Last Post: 07-26-2003, 11:48 AM
  4. top keywords of the day
    By dP munky in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 02-28-2003, 12:43 PM
  5. C# Keywords
    By Troll_King in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 10-28-2001, 11:00 AM