Search code examples
c++codeblocks

Why are some keywords colored green in CodeBlocks IDE(C++)?


enter image description here

Some keywords are colored green automatically. What do those words mean? Are those keywords reserved for C++? Can I use those words as program variables?


Solution

  • sizeof is an operator. You can't use it as an identifier.

    size is a function in std::, and also a member of many classes in std::. You should use it as an identifier, if you are writing a Container type. It's fine to use it as an identifier elsewhere.