ok here is the problem. I read from a file a set of numbers each number representing something different EX
say the file contains 12.50_10_16_20_10
and the 12.50 reresents a cost 10,16,20,10 represent deminetions.
Syntax is getline(name of file, string variable name)
How would I read each number out seperatly as float int, int, int, int respectivley?
C++ getline help?
first read out the entire line as a string then using atoi and checking white spaces separate them and store in integer array or variable r do watever u like
Reply:Does not look easy. May be you can contact a C++ expert at websites like http://oktutorial.com/
flower girl
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment