code:Okay so I think n and p makes it that there's 2 separate structures declared for 'positive' and negative numbers, but I'm trying to figure out how do I pass the structures by reference.struct catstats
{
int c; // count of items
float t; // total of items
};
and then in main
void main()
{
catstats n, p; //positive and negative catstat structures
cin >> num;
x_positive( num, structure& p? );
x_negative( num, structure& n?
}
code:Like if the variables are already declared in the struct catstates, how do I get it so that they're passed right? I thought func( num, catstats& p )void x_positive( anum, structure& p? )
{
c++;
t = t + anum;
PrintCat();
}