Home

Roger wrote:
> Ok, I know in Java we can seperate class files so that we could use
> them later on.
>
> I am wondering if I could do the same for C++... Perhaps have a
> main.cpp and lets say for example function.cpp...
>
> I know you can do this with header files from what I have read.
>
> If it can be done, can anyone show/tell me? Thanks.
>

Yes, it can be done, every compiler I know of lets you do this.

Look at the pre-processor directive -
'#include <thing>'
or
'#include "file"'

Look up the use of "header file".

Almost every open-source CPP application/library will have lots of
examples of how to define interfaces in header files and separate the
code into a library or multiple files.

previous
next

map (associative array) loses values?
Multi Inheritance
Re: Program inefficiency?
Re: Job interview questions
Re: How to avoid overflow errors
Fundacja Sloneczko
Mam Marzenie
Fundacja Avalon
Nasze Dzieci
Pajacyk