Search:

Type: Posts; User: TheBigH

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    2,319

    When I compile and run it, it does read from the...

    When I compile and run it, it does read from the file. If I make a file containing the contents


    + 5.4 7.5

    the program gives me 12.9 like it should. What problem are you getting?
  2. Replies
    4
    Views
    2,319

    You want if( choice == 'H' ) A single...

    You want


    if( choice == 'H' )


    A single equals sign tells the program to set 'choice' to be whatever 'H' is. To test whether the two are equal you need a double equals.
Results 1 to 2 of 2