hi,
i am a very confused person at the moment!i have only started learning C++ but i have read many tutorials, but none of them touch on the subject i want!!
ok, i want the program to read a .txt(or suggest a better one if any one thinks this is wrong!!). I want it to be able to see the club name and then read along the line and see the capacity. i have put an example of the file in below.
Club Capacity
------------------------------
Villa 10,000
Blues 3,000
Then i want the program to times the capacity number for each club by 2, and to produce a .txt with the results (in the same format as other so:
Club Cost
------------------------------
Villa 20,000
Blues 6,000
)
This is just one program in a long list of ideas i have for my website to make my life alot easier. Unfortunatly they all involve reading from files like this.
so if you could help me on understanding how to go about building this it would be brillant!
cheers
Alex
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is a good source of...source code. If you look on the page that I have linked, there are examples dealing with reading from a file, and on the next page, writing to a file:
hi,
i am a very confused person at the moment!i have only started learning C++ but i have read many tutorials, but none of them touch on the subject i want!!
ok, i want the program to read a .txt(or suggest a better one if any one thinks this is wrong!!). I want it to be able to see the club name and then read along the line and see the capacity. i have put an example of the file in below.
Club Capacity
------------------------------
Villa 10,000
Blues 3,000
Then i want the program to times the capacity number for each club by 2, and to produce a .txt with the results (in the same format as other so:
Club Cost
------------------------------
Villa 20,000
Blues 6,000
)
This is just one program in a long list of ideas i have for my website to make my life alot easier. Unfortunatly they all involve reading from files like this.
so if you could help me on understanding how to go about building this it would be brillant!
cheers
Alex
This is a good source of...source code. If you look on the page that I have linked, there are examples dealing with reading from a file, and on the next page, writing to a file:
http://www.gametutorials.com/Tutorials/c++/Cpp_Pg2.htm
Wayne
cheers!i will look on that as soon as i get the time:)!