Thread: Multiple Solutions in Visual C++ Project

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    2

    Multiple Solutions in Visual C++ Project

    Hello,

    New to Visual C++ enivronment. Post questions separately.

    I know you can have multiple solutions in a project.

    Question:

    If I create two simple console applications, that have separate main's. Can I place them into one project and If I can how could I compile each separately (any conflicts)


  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    I doubt you can, but personally I haven't tried it. Why exactly do you want / need them in the same project? I can't think of a reason, but maybe I'm missing something.

    If you can, definitely try and keep separate programs in separate projects. If your programs share resources, just place a "copy" of that resource in each project.

  3. #3
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    >>I know you can have multiple solutions in a project.
    No, you can have multiple projects in a solution.

    >>Can I place them into one project
    No, but you can place them in the same solution. In Visual C++ 2005, you go file->new->project, then change the dropdown box from "create new solution" to "add to solution". Now you'll have two projects side by side that you can compile separately. To switch between projects, you set the project you want as the active project (not sure where the button is, but it should be there somewhere).
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Templates and Macros plus more...
    By Monkeymagic in forum C++ Programming
    Replies: 8
    Last Post: 01-20-2007, 05:53 PM
  2. multiple language project
    By TankCDR in forum C# Programming
    Replies: 11
    Last Post: 02-09-2005, 06:33 AM
  3. What's wrong with this code??
    By Xanth in forum C Programming
    Replies: 11
    Last Post: 12-23-2004, 02:41 PM
  4. pointer to array of objects of struct
    By undisputed007 in forum C++ Programming
    Replies: 12
    Last Post: 03-02-2004, 04:49 AM
  5. Using 'if' with char arrays or string objects
    By c++_n00b in forum C++ Programming
    Replies: 36
    Last Post: 06-06-2002, 09:04 PM