Hi ,
Assuming I have a text file containing numbers , exp : 1_234
And i want to store 1 as int ID1, 234 as ID2.
How can I skip underscore "_" ?
ifstream infile;
infile >> ID1 >> ID2 , ??? I'm still not sure
Thanks .
Hi ,
Assuming I have a text file containing numbers , exp : 1_234
And i want to store 1 as int ID1, 234 as ID2.
How can I skip underscore "_" ?
ifstream infile;
infile >> ID1 >> ID2 , ??? I'm still not sure
Thanks .
Jump to PostPlease describe exactly what your file format is -- character by character in general terms (character digit etc...). Write that description down. Look carefully at it. What is your input statement missing given that format.
Please describe exactly what your file format is -- character by character in general terms (character digit etc...). Write that description down. Look carefully at it. What is your input statement missing given that format.
its just a file .txt , character by character.
I am not sure how to deal with symbols like _ , * when reading from a file.
Reread what I wrote. It tells you to do something specific. Your post shows you did not read it carefully.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.
You're trying to visit a URL that doesn't currently exist on the web. Most likely, a member posted a link a long time ago to a web page that has since been removed. It's also possible that there was a typo when posting the URL. We redirect you to this notice instead of stripping out the link to preserve the integrity of the post.