Thread: cat project

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Linux is where it's at movl0x1's Avatar
    Join Date
    May 2007
    Posts
    72
    How about doing the fopen part like

    Code:
    if ( (fp = fopen("file_name", "w")) == NULL) {
          fprintf(stderr, "Couldn't open %s for writing\n", file_name);
          exit(1);
    }

    Also, in the switch() statement after "case 'w':" there's
    no "break" statement.
    Last edited by movl0x1; 05-18-2007 at 01:35 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 09:05 AM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  3. Game Independent Anti-cheat Project Needs Programmers
    By GIA Project Lea in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 09-15-2005, 07:41 PM
  4. HowTo (give your cat a pill)
    By Carlos in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 01-21-2004, 04:20 PM