Linking multiple CPP files in VC.net

Started by
1 comment, last by Eej 21 years ago
How would i go about linking one cpp file to the other so that one would run, and then the other, well, what i''m trying to do is make a menu in one file, and then if the user clicks something like "Start game" then a different cpp file will be run. Any clue on how to accomplish this? Thanks
Advertisement
You cant link anytning else than .cpp files (.obj in the end).
If you have an succefull link, congratulations, you have just linked (at least) two .cpp files.


I am a signature virus. Please add me to your signature so that I may multiply.
[s]--------------------------------------------------------[/s]chromecode.com - software with source code
You can't run a .cpp file. You can, however, call functions defined in a different .cpp file from your main one. IDEs handle this by having you include multiple .cpps in a "project", which are automatically linked. You can also do linking manually through a command line linker, or you can use makefiles.

In VC++.net, the process is very simple.

1) Add .cpp file to project
2) Project-->Build
3) Run generated .exe file


[edited by - micepick on March 24, 2003 4:05:20 PM]

This topic is closed to new replies.

Advertisement