Thread: Changing filename to all capitals

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,210
    How about treating us seriously? Shall I begin to list why your code sucks?

    • You use gets() like I told you not to.
    • You open the input file for writing.
    • You write to the input file.
    • You only close one file.
    • You didn't even read the documentation on toupper().
    • Your indentation sucks.


    That might be a good starting place for you to start fixing things. Your code shouldn't even compile in its current form.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by MacGyver View Post
    That might be a good starting place for you to start fixing things. Your code shouldn't even compile in its current form.
    Actually, it probbaly does, but with warnings enabled it would give quite a few warnings. I suggest you enable warnings on the compiler you are using:
    • gcc: -Wall
    • MS visual C: -W3

    For other compilers, refer to the relevant manual.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 04-11-2009, 01:49 AM
  2. can someone help me with these errors please code included
    By geekrockergal in forum C Programming
    Replies: 7
    Last Post: 02-10-2009, 02:20 PM
  3. Pass Filename to another function
    By awesmesk8er in forum C Programming
    Replies: 9
    Last Post: 10-24-2008, 01:43 PM
  4. Changing filename extension
    By slippy in forum C Programming
    Replies: 3
    Last Post: 05-03-2007, 11:04 AM
  5. Replies: 3
    Last Post: 01-25-2006, 10:30 PM