M
Michael Bell
Working my way through Koenig & Moo "Accelerated C++" and using
Borlang Builder 5 (but that is probably not relevant) I reached
exercise 1-1 and typed in
#include <vcl.h>
#pragma hdrstop
#include <iostream>
#include <string>
int main(int argc, char*argv[]}
{
const std::string hello = "Hello" // This by itself compiled
const std::string message = "Hello" // and other stuff which I have
//left out here.
system("PAUSE");
return 0;
}
But I left caps lock on, and by mistake typed MESSAGE, and it didn't
compile. I retyped message in lower case it did compile! I was
astonished. I thought you could give variables any name you liked,
capitalised or not.
What's the explanation? Is MESSAGE a reserved word?
Michael Bell
--
Borlang Builder 5 (but that is probably not relevant) I reached
exercise 1-1 and typed in
#include <vcl.h>
#pragma hdrstop
#include <iostream>
#include <string>
int main(int argc, char*argv[]}
{
const std::string hello = "Hello" // This by itself compiled
const std::string message = "Hello" // and other stuff which I have
//left out here.
system("PAUSE");
return 0;
}
But I left caps lock on, and by mistake typed MESSAGE, and it didn't
compile. I retyped message in lower case it did compile! I was
astonished. I thought you could give variables any name you liked,
capitalised or not.
What's the explanation? Is MESSAGE a reserved word?
Michael Bell
--