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;
}

Look at that first error message, then look at your program. Do you see aTable defined anywhere ? Answer: NO you will not. Well what do you think you need to do about it? Hint: Check spelling and capitalization.

You also need to include <iomanip> to get the setw function declared.

i dont know how to declare aTable. where to put it?

You do NOT declare aTable -- aTable is a mistake. You need to correct the spelling.

oooo..like that.thak you ancient dragon.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.