how to call a function from another cpp

A

ahso

Hi
how to execute a function from another *.cpp? Also how to declare that
function in both cpp files?
Many thanks
Michael
 
I

Ian Collins

Hi
how to execute a function from another *.cpp? Also how to declare that
function in both cpp files?

Declare it in a header and include the header in both.
 
N

Nick Keighley

Hi
how to execute a function from another *.cpp? Also how to declare that
function in both cpp files?

I tried both the C and C++ FAQs (Frequently Asked Questions) and
couldn't find this one. maybe it's so fundamental it didn't seem worth
a FAQ. Check out your textbook. K&R definitely describes this quite
well and I'm sure Stroustrup does too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top