Menu

Very confused newbie!!

2003-08-13
2012-09-26
  • Alex Salter

    Alex Salter - 2003-08-13

    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

     
    • Wayne Keen

      Wayne Keen - 2003-08-14

      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

       
    • Alex Salter

      Alex Salter - 2003-08-14

      cheers!i will look on that as soon as i get the time:)!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.