V
vaclavpich
Hi,
I have a question on constant variables.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
#include <cstdlib>
#include <iostream>
using namespace std;
const static char* STATIC_CONST_NAME = "Hello";
const char* CONST_NAME = "Hello";
int main(int argc, char *argv[])
{
cout << STATIC_CONST_NAME << endl;
cout << CONST_NAME << endl;
system("PAUSE");
return EXIT_SUCCESS;
}
Can anybody explain to me different between (const static char*) and
(const char*) ?
Thanks.
I have a question on constant variables.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
#include <cstdlib>
#include <iostream>
using namespace std;
const static char* STATIC_CONST_NAME = "Hello";
const char* CONST_NAME = "Hello";
int main(int argc, char *argv[])
{
cout << STATIC_CONST_NAME << endl;
cout << CONST_NAME << endl;
system("PAUSE");
return EXIT_SUCCESS;
}
Can anybody explain to me different between (const static char*) and
(const char*) ?
Thanks.