Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Going to next line while reading from file

Posted on 1998-11-23
2
Medium Priority
?
185 Views
Last Modified: 2013-11-20
I am doing some data acquisition stuff and happen to have as much as 8000 sets of numbers in one line and each number being at least 8 digits 8*8000 is a big number for me to use with //getline(buffer,max)//for the buffer(waste of memory).I want to read a number in between those 8000 sets which I can and I need to go to the next line after that, is there an option while reading from a file to go to the next line without using getline(buffer,max)command......
0
Comment
Question by:sram
2 Comments
 
LVL 7

Expert Comment

by:psdavis
ID: 1325191
Delete this duplicate question and retrieve your points back.
0
 

Accepted Solution

by:
gspk earned 100 total points
ID: 1325192
Use CStdioFile class functions like

ReadString(CString parameter)

This function reads one line of text from your file provided that line ends with carrriage return line feed pair. And then using CString functions you can do what ever you want with the string contents.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question