>how can i skip the 1st 2 lines from my input file
Read file in line by line
If line number equals 1 or 2
then
//ignore
endif
else
//do other stuff
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
To read in a line, assuming your file is a plain text file, you can use
cin.getline() or getline - assuming you read in each line as a std::string.
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
If you don't know what getline is then maybe you should google it?
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439