Results 1 to 20 of 20

Thread: [Resolved] Vector help

Threaded View

  1. #16
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Tried it here, runs without any crashes / runtime errors... what compiler are you using?

    also:
    Code:
       if (!infile)
       	{
          	cout << "Fatal Exception: File could not be opened." << endl
             	  << "Press any key to terminate...";
             while (!kbhit());
             return 1
          }
    You'd want the code to terminate

    And I recommend not to use conio.h, include <iostream> (for cin and cout) and use
    Code:
    system("pause");
    instead of
    Code:
    while (!kbhit());
    And consider using a switch statement rather than your if - elseif
    Last edited by Jop; Apr 1st, 2003 at 08:44 PM.
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width