cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Reading text file
Reading text file
Mar 30, 2016 at 4:22am UTC
alex067
(401)
I have a text file containing:
int Bob, 2you, john, AdamSmith;
float taxYear=2013, taxRate=29.2.3;
And I need to read it in a way where I analyze:
int
Bob
2you
john
AdamSmith
float
taxyear
2013
taxRate
29.2.3
,
;
So basically instead of reading it line by line, I need to break it into segments. How could I read a text file this way?
Mar 30, 2016 at 5:07pm UTC
alex067
(401)
Any help please
Mar 30, 2016 at 5:40pm UTC
miah612000
(142)
If the file has been written into the program file use ofstream myfile;
myfile ("file name);
then call out the variables
use ifstream to write the file to the project folder?
Topic archived. No new replies allowed.