This question already has answers here:
Delete a character from a file in C
(5 answers)
Closed 9 years ago.
I need to delete some starting contents from a text file.
Is there any way to do this.
I tried but i am not able to find any solution for this
Please help me
Thanks,
You can use external system tools to do that. In c++, such utilities can be launched using the function system()
Related
This question already has answers here:
C++ CSV line with commas and strings within double quotes
(3 answers)
Closed 5 years ago.
I am using CSV file with comma as delimiter
getline(strGetLine, word, ',')
I have a problem while reading something which as comma in between
Example -"mysentence,fromCSV"
Please let me know how to handle it.
I would recommend using a library, since this is not a new problem and has been solved several times.
The first example I can find is https://github.com/ben-strasser/fast-cpp-csv-parser, but you could also do something with Boost Spirit if you felt inclined.
This question already has answers here:
How do I input variables using cin without creating a new line?
(7 answers)
Closed 7 years ago.
in my Windows Console application I have to read characters from stdin without waiting for newline (press Entrer).
I tried out get, getchar and tons of other solutions, but this question still open for me. Can anybody help me, how I can reach it?
It's _getch (or _getche if you want character echoing). Include <conio.h>.
This question already has answers here:
How can we check if a file Exists or not using Win32 program?
(9 answers)
C++: Which is the best method of checking for file existence on windows platform [duplicate]
(11 answers)
Closed 9 years ago.
I need a function in c++ to check if a given path/filename exists on the computer.
Can anyone help me?
This could be another possibilty besides the ones from the comments
PathFileExists
This question already has answers here:
parse a xml in c++
(3 answers)
Closed 8 years ago.
So I have gotten the website source, and now im trying to grab the data inside the tags. How would I go about doing that. Thanks
For example,
<start>value</start>
Set a string to value
http://expat.sourceforge.net/ and http://msdn.microsoft.com/en-us/magazine/cc163436.aspx two more alternatives apart from http://xerces.apache.org/xerces-c/ as mentioned by mtahmed. There are plenty more. Please compare them based on your requirement.
You can use an XML parser library. Here is a link to one such library: http://xerces.apache.org/xerces-c/
This question already has answers here:
Cross-platform crash handler
(3 answers)
Closed 9 years ago.
Are there any cross platform crash reporters for C++ besides google-break pad? I have seen google-breakpad but it has very very limited documentation, and I have nothing seen very much mentioned here, google or other source websites
Have a look at BugTrap which might help you.