Another const variable
Compiler: Visual C++ Express Edition 2005
Compiled on Platform: Windows XP Pro SP2
Header file: Standard
Additional project setting: Set project to be compiled as C++
Project -> your_project_name Properties -> Configuration Properties -> C/C++ -> Advanced -> Compiled As: Compiled as C++ Code (/TP)
To do: Display a string
To show: Another const variable
// const variable
using namespace std;
const int ArrayOne = 64;
// The following code is legal in C++, but not in C
char StoreChar[ArrayOne] = "This is a test string!!!";
cout<<"The stored string is = "<<StoreChar<<"\n";
The stored string is = This is a test string!!!
Press any key to continue . . .