Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
File Merging in C++
#12
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...

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;
}

????
Reply


Messages In This Thread
File Merging in C++ - by MariettaRC - 2013-09-27, 06:37 AM
File Merging in C++ - by SaptaZapta - 2013-09-27, 07:41 AM
File Merging in C++ - by MariettaRC - 2013-09-27, 07:59 AM
File Merging in C++ - by MariettaRC - 2013-09-27, 11:38 AM
File Merging in C++ - by SaptaZapta - 2013-09-27, 11:43 AM
File Merging in C++ - by MariettaRC - 2013-09-27, 11:53 AM
File Merging in C++ - by Dusk - 2013-09-27, 11:55 AM
File Merging in C++ - by SaptaZapta - 2013-09-27, 12:07 PM
File Merging in C++ - by MariettaRC - 2013-09-27, 01:52 PM
File Merging in C++ - by SaptaZapta - 2013-09-27, 02:00 PM
File Merging in C++ - by MariettaRC - 2013-09-27, 02:02 PM
File Merging in C++ - by MariettaRC - 2013-09-28, 02:31 PM
File Merging in C++ - by SaptaZapta - 2013-09-28, 03:23 PM
File Merging in C++ - by Dusk - 2013-09-28, 03:23 PM
File Merging in C++ - by MariettaRC - 2013-09-28, 03:30 PM
File Merging in C++ - by SaptaZapta - 2013-09-28, 03:38 PM
File Merging in C++ - by MariettaRC - 2013-09-28, 03:47 PM
File Merging in C++ - by Dusk - 2013-09-28, 03:51 PM
File Merging in C++ - by SaptaZapta - 2013-09-28, 03:56 PM
File Merging in C++ - by MariettaRC - 2013-09-28, 04:02 PM
File Merging in C++ - by SaptaZapta - 2013-09-28, 04:13 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)