: : when you are reading from files how do you skip to the next line down in the file. : : read it one line at a time until you get to the line you want. : : : : I want to read until i get what i want on a line and the just skip over the rest of that line. I want to know if there is a command that will do that
: : : when you are reading from files how do you skip to the next line down in the file. : : : : read it one line at a time until you get to the line you want. : : : : : : : : I want to read until i get what i want on a line and the just skip over the rest of that line. I want to know if there is a command that will do that : : no, you have to write the algorithm yourself. But I don't know just what you mean by "skip over the rest of the line". Can you post an example?
: : : : when you are reading from files how do you skip to the next line down in the file. : : : : : : read it one line at a time until you get to the line you want. : : : : : : : : : : : : I want to read until i get what i want on a line and the just skip over the rest of that line. I want to know if there is a command that will do that : : : : : no, you have to write the algorithm yourself. But I don't know just what you mean by "skip over the rest of the line". Can you post an example? : : :
Is this C or C++... perhaps he means something along the line of the [b]ignore[/b] member function for input streams, i.e.: [code] ifstream input("file.txt"); ... input.ignore(x,' '); // <- replace x with the maximum expected line length [/code]
Comments
read it one line at a time until you get to the line you want.
:
:
: read it one line at a time until you get to the line you want.
: :
:
:
I want to read until i get what i want on a line and the just skip over the rest of that line. I want to know if there is a command that will do that
: :
: : read it one line at a time until you get to the line you want.
: : :
: :
: :
: I want to read until i get what i want on a line and the just skip over the rest of that line. I want to know if there is a command that will do that
:
:
no, you have to write the algorithm yourself. But I don't know just what you mean by "skip over the rest of the line". Can you post an example?
: : :
: : : read it one line at a time until you get to the line you want.
: : : :
: : :
: : :
: : I want to read until i get what i want on a line and the just skip over the rest of that line. I want to know if there is a command that will do that
: :
: :
: no, you have to write the algorithm yourself. But I don't know just what you mean by "skip over the rest of the line". Can you post an example?
:
:
:
Is this C or C++... perhaps he means something along the line of the [b]ignore[/b] member function for input streams, i.e.:
[code]
ifstream input("file.txt");
...
input.ignore(x,'
'); // <- replace x with the maximum expected line length
[/code]
Read here File Input/Output in C programming