Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #14354 > unrolled thread

how to call a function from another cpp

Started byahso <ahso47@yahoo.com>
First post2012-02-21 01:29 -0800
Last post2012-02-21 01:58 -0800
Articles 3 — 3 participants

Back to article view | Back to comp.lang.c++


Contents

  how to call a function from another cpp ahso <ahso47@yahoo.com> - 2012-02-21 01:29 -0800
    Re: how to call a function from another cpp Ian Collins <ian-news@hotmail.com> - 2012-02-21 22:30 +1300
    Re: how to call a function from another cpp Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-02-21 01:58 -0800

#14354 — how to call a function from another cpp

Fromahso <ahso47@yahoo.com>
Date2012-02-21 01:29 -0800
Subjecthow to call a function from another cpp
Message-ID<8bbd9a12-7ecf-487e-b424-be863dc56078@9g2000yqo.googlegroups.com>
Hi
how to execute a function from another *.cpp? Also how to declare that
function in both cpp files?
Many thanks
Michael

[toc] | [next] | [standalone]


#14355

FromIan Collins <ian-news@hotmail.com>
Date2012-02-21 22:30 +1300
Message-ID<9qh6i0Fro7U1@mid.individual.net>
In reply to#14354
On 02/21/12 10:29 PM, ahso wrote:
> 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.

-- 
Ian Collins

[toc] | [prev] | [next] | [standalone]


#14363

FromNick Keighley <nick_keighley_nospam@hotmail.com>
Date2012-02-21 01:58 -0800
Message-ID<c4e302a9-a4de-48df-a436-fcad34d78174@l14g2000vbe.googlegroups.com>
In reply to#14354
On Feb 21, 9:29 am, ahso <ahs...@yahoo.com> wrote:
> 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.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.c++


csiph-web