What i'm trying to do is, basically, link one C++ File, to another. For example, first i have a cpp file, like, main. And I want to have a part where the user chooses something then the other cpp file opens.
Dannyo329 10 Junior Poster in Training
Recommended Answers
Jump to PostHow do you mean 'the other cpp file opens'?
Do you want function to be called from another CPP-file, or do you want the user to view the cpp-file's contents?
Jump to PostJust guessing here, but do you want main() to call a function that is another *.cpp file? For example,
// foo.cpp #include <iostream> int foo() { std::cout << "Hello World\n"; return 0; }
// main.cpp extern int foo(); int main() { foo(); return 0; …
All 6 Replies
Nick Evan 4,005 Industrious Poster Team Colleague Featured Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Dannyo329 10 Junior Poster in Training
mitrmkar 1,056 Posting Virtuoso
Dannyo329 10 Junior Poster in Training
mitrmkar 1,056 Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.