file io - Need basic help parsing a string in C++ -


C ++ is not my favorite language.

I have a file in which it is:

I want to separate E, 225, 370, 35 and 75 from each other but I'm having trouble. Whatever I found online and tried to do in my C ++ book and still is not working, please help.

I will have an easy time doing this in Java.

  #include & lt; Iostream & gt; # Include & lt; Fstream & gt; using namespace std; Int main () {ifstream f ("a.txt"); // Check the errors of four f, dummy; Int i1, i2, i3, i4; F & gt; & Gt; Ch & gt; & Gt; I1 & gt; & Gt; Dummy & gt; & Gt; I2 & gt; & Gt; I3 & gt; & Gt; Dummy & gt; & Gt; I4; The court's & lt; & Lt; Ch & lt; & Lt; Endl & lt; & Lt; I1 & lt; & Lt; Endl & lt; & Lt; I2's & lt; & Lt; Endl & lt; & Lt; I3's & lt; & Lt; Endl & lt; & Lt; I4 & lt; & Lt; Endl; Return 0; }  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -