What is the maximum limit for the number of characters in a variable name in C++, if any? I am using a g++ compiler.
Asked
Active
Viewed 115 times
1 Answers
1
According to https://gcc.gnu.org/onlinedocs/gcc/Identifiers-implementation.html
For internal names, all characters are significant. For external names, the number of significant characters are defined by the linker; for almost all targets, all characters are significant.
So it is implementation/target specific and you will have to check the documentation for your one.

Yunnosch
- 26,130
- 9
- 42
- 54