|
Rance Necaise
Visiting Associate Professor of Computer Science |
||
|
|
||
|
||||||||||||||||||||||||||||||||||||||||||
|
C++ Primer For Java Programmers Variable Declarations« | Table of Contents | »
IdentifiersAs in all programming languages, we use identifiers to name things such as variables, functions, data types, classes, etc. Identifiers in C++:
VariablesVariables in C++ must be explicitly declared as they are in Java. int grade, sum, total; double average, salary; In C++, variables are not initialized when they are created. You can declare a variable and initialize it at the same time int total = 0; double taxRate = 0.05; Data TypesC++ provides a number of primitive data types including
|
||||||||||||||||||||||||||||||||||||||||||