I have my two classes built, one actually uses the other as a data member. Now I need to call that object to fill an array and don't know the syntax to do it.

The two classes are in this thread
http://www.daniweb.com/forums/thread114985.html

The function prototype looks like this

void statistics (int rollarray[], int rollarraysize, int rollresults[]);

I'm trying to call the threedice object to fill the rollarray, and then I was going to use a switch statement to "sort" that data into the rollresults array.

Okay, over an hour and 39 views without a reply, is it that uninteresting or am I really being that much of a doofus?

here is what I have written so far but I don't know what goes in the for loop, and I don't know if I've declared the object correctly

void statistics (int rolls[];int rollsize; int rollresults [])
threedice tryerluk;
rollsize=200;
rolls[rollsize];
rollresults[16];

for (int i=0;i<201;i++)
{
   tryerluk.rollem();
   rolls[i]=tryerluk.getsumFaces();
}

This gives me a heap of missing type specifier and syntax errors back in the threedice class data members (from class onedie) It says missing type specifier-int assumed C++ does not support default int. What am I missing?

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.