File Creation in share mode in VC++
-
Hi All, I need to remove duplicate lines in a text file, need to use that output file for other functions. Can any one suggest me how to remove the duplicate lines in a text file
-
neeraja31 wrote:
Can any one suggest me how to remove the duplicate lines in a text file
Read the file, sort the contents, discard the duplicates and write the remaining lines to a new file. Or did I misunderstand the question?
-
Hi All, I need to remove duplicate lines in a text file, need to use that output file for other functions. Can any one suggest me how to remove the duplicate lines in a text file
-
read text lines from file and save them to vector(or other container), then sort the vector and unique it.
-
Hi Thanks for yuor reply. How can i sort the text file using C++ code. If you have any piece of code please expain me with that
-
Hi Thanks for yuor reply. How can i sort the text file using C++ code. If you have any piece of code please expain me with that
neeraja31 wrote:
How can i sort the text file using C++ code.
How about
std::sort()
?"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Please give me te\he piece of code to read from vector, confirm me whether that will work on win32 VC++ project
One example, assuming you are storing
int
s in thevector
, looks like:vector<int> nums;
for (vector<int>::iterator i = nums.begin(); i != nums.end(); i++)
cout << *i << endl;;"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons