> 1) Integerclass.h containing :
...
> 2) Integerclass.cpp containing :
...
> 3) my_prog.cpp containing
...
> But when I compile and link this :
> 
> c++ -o my_prog my_prog.cpp
That command says to compile my_prog.cpp to an object and use only
that object, plus the standard libraries, to build my_prog i.e.
ignore Integerclass.cpp completely.  There are two obvious solutions:

1) Compile everything at once:

c++ -o my_prog my_prog.cpp Integerclass.cpp

2) Compile the source files seperately, and then link them together

c++ -c my_prog.cpp
c++ -c Integerclass.cpp
c++ -o my_prog my_prog.o Integerclass.o

Hope that helps.

Steven Smith,
[EMAIL PROTECTED]
-- 
One day, I'm going to get an Alice-bot to answer all my email for me,
and see how long it takes people to notice.

Attachment: pgp66715oj2ZM.pgp
Description: PGP signature

Reply via email to