Thread: naming conventions for project files

  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    46

    naming conventions for project files

    Not sure if this is the right palce for this question, but here goes.

    When you create a new project in C::B it makes a default .cpp file called main.cpp. I usually rename it to whatever I named the project.

    What is generally good practice here?

    Is there anything wrong with leaving it named main.cpp? Is there a possibility for conflicts with other projects?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,412
    Quote Originally Posted by tabl3six
    What is generally good practice here?
    Both your preference and the Code::Blocks default sounds fine to me.

    Quote Originally Posted by tabl3six
    Is there anything wrong with leaving it named main.cpp?
    No.

    Quote Originally Posted by tabl3six
    Is there a possibility for conflicts with other projects?
    Yes, but there will be a possibility for conflict no matter what you name the file, unless you take care to say, use separate directories, upon which there is no possibility for conflict no matter what you name the file.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What are good naming conventions?
    By marek. in forum C Programming
    Replies: 3
    Last Post: 03-28-2011, 02:11 PM
  2. Help naming files
    By piertony2000 in forum C++ Programming
    Replies: 5
    Last Post: 10-14-2009, 05:02 PM
  3. A "Naming Conventions" question
    By Petike in forum C++ Programming
    Replies: 5
    Last Post: 07-20-2008, 09:32 PM
  4. naming conventions?
    By Tox|k in forum C Programming
    Replies: 44
    Last Post: 05-26-2008, 08:29 AM
  5. standard naming conventions?
    By h_howee in forum C++ Programming
    Replies: 8
    Last Post: 11-10-2007, 11:53 PM