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

Viewed 382

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?

2 Answers

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.

sizeof is a keyword. size is not.

For a more comprehensive list have a look here.

Related