Possible Duplicate:
What does the word “literal” mean?
Often when reading literature about C++, I encounter the word “literal”. It is a bit unclear to me what exactly this term means in C++.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A literal is some data that’s presented directly in the code, rather than indirectly through a variable or function call.
Here are some examples, one per line:
The data constituting a literal cannot be modified by a program, but it may be copied into a variable for further use:
This concept is by no means unique to C++.
The term “literal” comes from the fact that you’ve written data literally into your program, i.e. exactly as written, not “hidden” behind a variable name.