using more than one cpp source

This is a discussion on using more than one cpp source within the C++ Programming forums, part of the General Programming Boards category; its easy to include the resource file, and use multiple header files, however, i just dont understand how to use ...

  1. #1
    Emotionally Unstable DarkViper's Avatar
    Join Date
    Oct 2002
    Posts
    343

    using more than one cpp source

    its easy to include the resource file, and use multiple header files, however, i just dont understand how to use more than one source file. I was told to just make it and include it, but that didn't work out and now were both stumped.

    Basically, all my projects have been one source file, DarkCode, HyperTextFX, both have over 2000 lines of code to sift through in one file, i would REALLY like to diminish this and separate into more than one source.

    Could someone help me on the procedure to do this.

    Thanks.
    ~DJ DarkViper signing out
    ----------------------------------------
    My Site:
    Black Jaguar Studios

    Languages:
    Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP

    Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt

  2. #2
    Registered User
    Join Date
    Sep 2003
    Posts
    25
    Just include a new file to the project on the project menu in msvs,
    or if you´re compiling manually just add all your .cpp files on the commandline like this: cl file1.cpp file2.cpp

  3. #3
    Emotionally Unstable DarkViper's Avatar
    Join Date
    Oct 2002
    Posts
    343
    whats the general rule for splitting? like where would i split the source files for DOS and or Windows programming? I know for a fact that you need all the class definitions for the window in one file, but after that, i just dont understand.

    Ill give that method a try when i get home today pheer. Thanks.
    ~DJ DarkViper signing out
    ----------------------------------------
    My Site:
    Black Jaguar Studios

    Languages:
    Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP

    Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt

  4. #4
    Registered User
    Join Date
    Sep 2003
    Posts
    25
    General rule? No, just use your common sense. Put all graphics code in one file and the soundcode in another and so on.

  5. #5
    Emotionally Unstable DarkViper's Avatar
    Join Date
    Oct 2002
    Posts
    343
    makes sense...

    would it be at all wise to put every dialog box function in its own source? (i have like...7 at the most)

    glowtext.cpp = has the entire IDD_GLOW dialog box functions, while the resource script models the way it appears
    ~DJ DarkViper signing out
    ----------------------------------------
    My Site:
    Black Jaguar Studios

    Languages:
    Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP

    Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Debug into Source
    By lehe in forum C++ Programming
    Replies: 4
    Last Post: 02-18-2009, 09:45 AM
  2. Open Source Licenses
    By Mario F. in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 10-10-2006, 08:53 PM
  3. Multiple Cpp Files
    By w4ck0z in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 01:41 PM
  4. Tutorial review
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 03-22-2004, 08:40 PM
  5. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 09:33 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21