On 26 Feb, 11:22, carmelo <carmelo.abr... @gmail.comwrote :
'Hi,I need to use in main.cpp, a method that is defined in
another .cpp file. How can I do it?
In addition to the responses you've had, I would add that if (and you
don't state, so I don't know) your question relates to templates, you
might want to check out the FAQ at http://www.parashift.com/c++-faq-lite/templates.html
On Feb 26, 4:22 pm, carmelo <carmelo.abr... @gmail.comwrote :
'Hi,I need to use in main.cpp, a method that is defined in
another .cpp file. How can I do it?
You can use header file , source file approche.
Declare the function in the header file and provide the defination in
the source file.
Include this header file using #include statement in the main.cpp.
Comment