mn_011983 wrote:
> this is bout global variable.
> why cnat i initialize a global variable with another another variable;
I assume you mean something like this:
int i = 5;
int j = i;
int main()
{
return 0;
}
You can't because it is a compile-time restriction. You are asking for
code to be executed outside of functions. Think of globals as
pre-allocated memory storage vehicles (exception: C++ class
declarations have their constructors called at runtime BUT there are
issues with using C++ classes as globals).
--
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197
*NEW* MyTaskFocus 1.1
Get on task. Stay on task.
http://www.CubicleSoft.com/MyTaskFocus/