this is really pissong me off !!!
i have got it to work fine for the first 3 bits[havent attempted the last one yet].
but so that it isnt too much of a hassle i am just using the main fille, ass4.cpp, and just making 4 functions and getting rid of the #include "ass4_funtions.cpp" line.
so thats what i have done so far. that isnt really the exact problem...here is my problem.
lets take the majority() as an example.
Code:
bool Majority(int A[MAX_SIZE], int F, int L, int result)
{
blah blah blah
return true;
OR
return false;
}
i have to return either true of false right? because in main the thing is going to read:
Code:
if (Majority(A, F, L, result))
{
...
}
if in my majority(), i give result a value, it doesnt come up properly.
i can work around it by saving my result as 'globalresult', which is a global variable and changing the above line of code as
Code:
if (Majority(A, F, L, result))
{
result = globalResult;
...
}
and everything works fine. the problem now is that i only submit my functions file and i cant put the global variables like i would like to when they automark.
anyone who can, please help!!
the fact that i have done the 'hard bit' and now this stupid file shit is pissing me off!
thanks!
btw, sorry if i didnt explain properly, i'm in a rush for work...ask for details and i'll explain when i return. thanks again.