How do I use this typedef in a vector?

Joined
Jun 9, 2007
Messages
4
Reaction score
0
Basically, how do I do this?
I want the array as a typedef for super-neatness and so I can do vec.front()[0] or vec[0][0]

Code:
typedef int taxTable[8];//the type taxTable should be 8 ints
int size = sizeof(taxTable);//32, shows the array is working ok
taxTable taxes;
std::vector<taxTable> treasury;

treasury.push_back(taxes);
//error C2440: 'initializing' : cannot convert
//from 'const int [8]' to 'taxTable '

treasury.resize(1);
//error C2440: '<function-style-cast>' :
//cannot convert from 'int' to 'taxTable '
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top