5 ms·
The arrow operator and identifiers with leading underscores seem to be glossed over or skipped fairly often in education. It's intimidating to look at code tha
by synacksynack 15y ago
The arrow operator and identifiers with leading underscores seem to be glossed over or skipped fairly often in education. It's intimidating to look at code that uses them if you don't know what they are.
- palish 15y agoIdentifiers with leading underscores? I use those for member variables... (this makes more sense in C++ without the arrow notation.)
- __rkaup__ 15y agoMaybe he's referring to how identifiers with leading underscores followed by a capital letter are reserved in C++ (I'm not sure if they are in C)...
- palish 15y agoOho. Followed by a capital letter? Interesting. I always thought that "all identifiers with a leading underscore were reserved". I just consciously ignored it, and have never had a problem in years. But I was also always using member variable names like "_children", "_childCount", etc, not "_Children".
- __rkaup__ 15y agoIn fact, here's a reference: http://msdn.microsoft.com/en-us/library/e7f8y25b(v=vs.80).aspx http://msdn.microsoft.com/en-us/library/e7f8y25b(v=vs.80).as... (It's in a "Microsoft Specific" block but says it's part of the ANSI C standard.) It applies to C, and it also applies to identifiers staring with two underscores.
- spc476 15y agoThe C Standard reserves identifiers starting with a leading underscore for the system implementation (C standard library, Posix libraries, etc). They aren't meant for use by user code (or rather, you can use them, but they might conflict with system defined identifiers).