Question

i was thinking if it was possible to separately write programs and then use it in a single program
my idea was to make a program for storing profiles and another program for game logic,..
and then combine it ( or use it ) into a single program

Profile.cpp --------- bridge.cpp-------------game.cpp

where bridge will be used to access (and display )both the cpps

Was it helpful?

Solution

Yes, C++ supports separate compilation, so you can write your program in pieces, in separate source files. You compile the files and link them together to create the executable file. The command line compiler can do it for you:

bcc bridge.cpp profile.cpp game.cpp
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top