Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6908977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:37:50+00:00 2026-05-27T08:37:50+00:00

In Visual Studio 2010 I created a test C++ project, with precompiled headers. So,

  • 0

In Visual Studio 2010 I created a test C++ project, with precompiled headers. So, Test1.cpp got created. When ever I hit run the code present in this file gets executed by default.

Suppose I manually add test2.cpp in the existing project. Then where should I change the setting in such a manner that after clicking run it executes the code present in test2.cpp by default.

Any help is appreciable!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:37:51+00:00Added an answer on May 27, 2026 at 8:37 am

    After it’s all compiled, the final binary doesn’t know which file the code came from. (It’s in the debug information, but that isn’t used to run the code.) Instead, it runs whichever block of code has the correctly named entry point, in this case

    int main(int argc, char* argv[])
    

    (or probably _tmain for Unicode / not).

    Do you have a main function in both files? That would cause linker errors. I suggest you just rename one out of the way, e.g. rename the one you don’t want to run to main_test1 and the one you do to main.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a new Visual Studio 2010 Test Project. <solution> <test-project> Resources test-data.csv tests.cs
IDE: VS2010 Framework.net: 4.0 I created a c# dll project under Visual Studio 2010,
I just created a Visual Studio 2010 console application project, c#. Then I added
I created client from wsdl file using visual studio 2010 Pro, created new project,
I've created a DLL to a project in Visual Studio 2010. I'm using this
I created a new blank win32 C++ project in Visual Studio 2010. I inputted
I have created a sample c++ project under Visual Studio 2010 with following files.
In Visual Studio 2010 Beta 2 I created a new navigation Silverlight application. Without
Whenever I create a new project in the Visual Studio 2010 Release Candidate, for
Is Visual Studio 2010 RC ever going to expire? Sorry if this isn't the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.