Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #55.0K
~13.7K People Reached
Favorite Tags

3 Posted Topics

Member Avatar for gugushe

You can seek the stream to the desired position and then read stream. Check this piece of code. // get size of file infile.seekg(0,ifstream::end); size=infile.tellg(); infile.seekg(0); Learn C++ here https://hackr.io/tutorials/learn-c-c-plus-plus All you need to do is to remember the position where you stopped reading infile, close outfile, open new outfile, …

Member Avatar for tinstaafl
0
1K
Member Avatar for Anna_12

First, your comparison function needs to be able to access the private member text of myclass. You could either make text public or add friend int cmp (const void *, const void*); in the class definition. Second, your comparison function is wrong. It takes pointers to the members of the …

Member Avatar for Nihar_2
0
279
Member Avatar for John_159

Here is a pseudocode, 1. read the entire file into a vector 2. delete that file 3. create and write back the data to the file skipping the line that isn't required. Use std::getline() in a loop to read a line from the file. Learn C++ here https://hackr.io/tutorials/learn-c-c-plus-plus Load the …

Member Avatar for Nihar_2
0
12K

The End.