Stop Microsoft
Miscellaneous => Programming & Networking => Topic started by: smokey on 7 September 2002, 20:48
-
I am writing an app in c++ and I have a class which I need to be able to access in two cpp files but I dont know how to do this. How would I go about to get two cpp files to use this one class? Thanks in advance (http://smile.gif)
-
err, im probably wrong, but try making something like
blah.h
and sticking the class in the header
and having
#include "./blah.h"
/*not sure about how to do it, haveint played with c++ in months*/
-
it worked (http://smile.gif)
thanks again
-
a small note about the #include directive:
#include <filename> will include the given file name from the global includepath first and #include "filename" will include the given file name from the current path first. So the ./ is not neccesary if you use quotes.