Name: Anonymous 2006-02-14 11:10
//int main()
//{
// int n;
//
// cout << "Welcome to a much better class demo!" << endl
// << "How many employees do you want to index?" << endl;
// cin >> n;
//
// const int EMS = n;
//
// Employee theEmployees[EMS]=
// {
// Employee(),
// };
//}
For some reason this gives me the error "variable-sized object 'theEmployees' may not be initialized"
It works fine with an absolute numerical value for the array size, not sure why the variable won't work.
//{
// int n;
//
// cout << "Welcome to a much better class demo!" << endl
// << "How many employees do you want to index?" << endl;
// cin >> n;
//
// const int EMS = n;
//
// Employee theEmployees[EMS]=
// {
// Employee(),
// };
//}
For some reason this gives me the error "variable-sized object 'theEmployees' may not be initialized"
It works fine with an absolute numerical value for the array size, not sure why the variable won't work.