Sunday, July 12, 2009

I have a lot of data in a file I would like to read into an array in C++.. Anyone have code that will allow th

I have a coordinate I would like to pair up with numerous other data. How can I use C++ to read the file into an array?

I have a lot of data in a file I would like to read into an array in C++.. Anyone have code that will allow th
the best way would be to use the stream function , within a loop..





define some sort of struct or type ..e.g.





struct coords , xpos int , ypos int





then read each line, or sent a new bunch of them for say a seperator , such as a comma or fullstop .check for End Of Line char, increment the new set of coord's . repeat this loop till the End Of File char is true.





I'm not giving you the actual code, as maybe its your homework =)

floral centerpieces

No comments:

Post a Comment