sweet. thank you.
Type: Posts; User: boojus
sweet. thank you.
im trying to put a vector into another vector using push_back.
but its not happening.
vector<int> a; vector<int> temp;
//...//
temp.push_back(a);
oh, i had the wrong code in the declaration of my function. im awesome. thanks for helping me. it works now.
what is the format for this part:
if(isMagicSquare(?)){...}
my magic square program is almost working i think. I need help with sending the current vector to my bool type function "isMagicSquare(a[])" that decides whether it is a magic square or not.
...
hmm.
maybe it does work. i guess the array was quite big so when i tried to cout<<a; it was to big maybe and it gave me some weird value. well it does work how i need it to.
I'm trying to fill an integer array with descending values starting at a max of whatever the user enters. so if they enter 5, the array should be a[0]=1, a[1]=2, a[2]=3, a[3]=4, and a[4]=5. the...
i did it in case anyone wanted something similar
cout.setf(ios::fixed);
cout.precision(1);
cout << "\nTotal="<< setw(7+GetNumOfDigits(total)) << total << endl;
cout.precision(0);...
i need to format the output of my program so that it's like this:
Total=______ 1232.3
Count=________ 2
Average=_____616.2
the "_" character is just a fill character cause it wouldnt let me do...