Learn Advanced C++ Programming parsing text files

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

I just started c++ and I’ve had trouble reading a very big CSV file because it skips every other line. Couldn’t find any solutions after 6 hours and finally I found my mistake thanks a lot!

rizki
Автор

Thank you, that last part saved my final task in one of my courses. the get(); took away the first character of the next string, but if I just commented it out, I got another error. The input >> ws; saved the whole thing.

manageriec
Автор

your method of looping through text is interesting .
i've been doing stuff like this
deque<string> script;
ifstream file(filename);
for(string line;line != "end";getline(file, line)){
script.push_back(line);
}
then i would do whatever i needed to do on the deques elements instead of directly from the filesystem.
also could you not do a do while loop instead of a while loop, then the while will check before it returns to the beginning.

logangraham
Автор

I declared variable "string line" before the cycle "while" then used method "input.eof()" (end of file) as a condition for the cycle "while". The code works correctly and doesn't display any extra lines.

SergeySuper_Silver
Автор

Your channel name is Advanced c, Your channel logo is C# Advanced and this is c++

russianroomba
Автор

Thanks for the video.
Please upload a video for How to parse JSON in C++.

mdirshadalam
Автор

that empty new line because you have a new line at the end of your text file !

bartff
Автор

It looks great but keep getting errors with the code.

jrippee
Автор

This is a stolen video from CaveOfProgramming

christianjamesguevarra
Автор

Thank you for not being an Indian who barely speaks English lol.

catsultan