2013-09-28, 02:31 PM
(This post was last modified: 2013-09-28, 03:31 PM by MariettaRC.)
UNIX's repository is picky as hell jesus christ
Program is working. As far as I could tell, I did everything the assignment asked for. But using system("pause"); was a bad idea since it's not portable.I used cin.get(); instead, but now my program closes anyway. What's a working portable equivalent to system("pause")?
EDIT: Okay... it took that regardless. Whatever, I'll take it.
Also, this is one of the results on the repository...
"... check for ''inF.clear();+inF.seekg(+0L,+ios+::+beg+);'' ==> NOT FOUND"
Uh... but in my code I...
????
Program is working. As far as I could tell, I did everything the assignment asked for. But using system("pause"); was a bad idea since it's not portable.
EDIT: Okay... it took that regardless. Whatever, I'll take it.
Also, this is one of the results on the repository...
"... check for ''inF.clear();+inF.seekg(+0L,+ios+::+beg+);'' ==> NOT FOUND"
Uh... but in my code I...
Code:
int Sum (istream & inF)
{
inF.clear();
inF.seekg(0L, ios::beg); <--- IT'S RIGHT THERE.
int sum = 0;
int num;
while (inF >> num)
{
sum += num;
}
return sum;
}????

