How to correct it?
ompiling...
27.cpp
C:\Documents and Settings\ashida\My Documents\MASTER C++\main\27.cpp(21) : error C2065: 'aTable' : undeclared identifier
C:\Documents and Settings\ashida\My Documents\MASTER C++\main\27.cpp(21) : error C2109: subscript requires array or pointer type
C:\Documents and Settings\ashida\My Documents\MASTER C++\main\27.cpp(21) : error C2228: left of '.size' must have class/struct/union type
C:\Documents and Settings\ashida\My Documents\MASTER C++\main\27.cpp(22) : error C2065: 'setw' : undeclared identifier
Error executing cl.exe.
27.exe - 4 error(s), 0 warning(s)
#include <iostream>
#include <vector>
using namespace std;
int main ()
{
const int ROWS = 10,
COLUMNS = 10;
/*---------
Declaration
---------*/
vector< vector<double> >table(ROWS, vector<double>(COLUMNS, 0.0)); // 10 zero-initialized ints
unsigned int i;
// assign some values:
for (int row = 0; row < table.size(); row++)
{
cout << "Examcode:";
for (int col = 0; col < aTable[row].size(); col++)
cout << setw(8) << table[row][col];
cout << endl;
}
return 0;
}