![]() |
| ||
| file input don't know where to start Hello, this is my first post here. I'm taking c++ as an elective course, and I'm doing great until now. The problem I'm having is taking data from a txt file formatted line by line #### # ## for product id, store number, and quantity. I'm supposed to read this data and store it in three different arrays for each token. I think I can get it from there, but I don't know where to start, which library to use, confused by existing tutorials I've read, getting frustrated. Plz help. |
| ||
| Re: file input don't know where to start You don't need anything complex. You will only have to use the <string>, <fstream> and <iostream> libraries. You will have to read some file input tutorials in C++. Even that is not that complex. |
| ||
| Re: file input don't know where to start some progress made. i may have just needed the personal note --have been working on this stuff all day, the end of the term is coming on fast and we just took test 1 of 3 yesterday. here she is: #include <iostream> which gives the following errors: Quote:
|
| ||
| Re: file input don't know where to start That is because you have declared the second arguments of loadArray and printArray as a long array but you are inputing an int array.Change the declaration of idArray from int to long, or just use int in the function declarations. I dont think you will want it to use long arrays. The range of int should be enough. |
| ||
| Re: file input don't know where to start oh, now i see that. thx |
| All times are GMT -4. The time now is 3:03 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC