Thread: Can not create source file.

  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    21

    Can not create source file.

    I was hoping someone here could help me. I am using CodeBlocks.

    When I try to create a new source file instead of placing it in the folder "Sources" it places it in the folder "Others". I am sure I am following the wizard correctly to create a new source file.

    Any suggestion to what I could be doing wrong?

  2. #2
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    Are you browsing to where to save them or just naming the file on the fly? If it is the later, try the former ..

  3. #3
    Registered User
    Join Date
    Feb 2011
    Posts
    21
    I am browsing to the location.

  4. #4
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472

    source

    it sounds like you may have chosen to add a new empty file, instead of new source file and then choosing c++ etc, basically the problem is file extension, if not cpp or c then it will think is just txt and add as other. so check that out
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  5. #5
    Registered User
    Join Date
    Feb 2011
    Posts
    21
    I did. I know i is not an empty file. When I use the wizard it lets me choose between 3 files a source file, header file or other file. And I am very sure that I choose the source file (several times).

  6. #6
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,739
    Quote Originally Posted by Crux View Post
    I did. I know i is not an empty file. When I use the wizard it lets me choose between 3 files a source file, header file or other file. And I am very sure that I choose the source file (several times).
    Type the extension yourself just to be sure.
    Devoted my life to programming...

  7. #7
    Registered User
    Join Date
    Feb 2011
    Posts
    21
    Quote Originally Posted by Sipher View Post
    Type the extension yourself just to be sure.
    That one worked. Does this by any chance have something to do with me using Linux?

  8. #8
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,739
    Quote Originally Posted by Crux View Post
    That one worked. Does this by any chance have something to do with me using Linux?
    I can't say. It may even be a bug! Why don't you inform the CodeBlocks team about it?
    Devoted my life to programming...

  9. #9
    Registered User
    Join Date
    Feb 2011
    Posts
    21
    I will. Already mentioned it on their forums.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie homework help
    By fossage in forum C Programming
    Replies: 3
    Last Post: 04-30-2009, 04:27 PM
  2. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  3. Inventory records
    By jsbeckton in forum C Programming
    Replies: 23
    Last Post: 06-28-2007, 04:14 AM
  4. Simple File encryption
    By caroundw5h in forum C Programming
    Replies: 2
    Last Post: 10-13-2004, 10:51 PM
  5. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM