Typedefing an array

Joined
Jun 9, 2007
Messages
4
Reaction score
0
Basicall, how do I do this?

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

treasury.push_back(taxes);//would work if
//both treasury and taxes were of type int
//but: 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

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top