|
-
Mar 2nd, 2003, 06:22 PM
#1
Thread Starter
Member
How do I use a class from another file(very simple question)
Up to now, I've always been running everything from single files. But now, I've started to learn classes and this approach is no longer practical.
Essentially, I'm trying to create an instance of a certain class from within a different file (e.g. test file with a main() function).
How would I do this so my class is recognized from the test file?
(something like a package in PL/SQL or a package in Java...but how to do in C++??)
Thanks!!
-
Mar 2nd, 2003, 07:03 PM
#2
Addicted Member
I'm not familiar with the PL/SQL. But if yu are asking how to use a class from a header file in your main file its something like this:
Code:
#include "classFileName.h"
int main()
{
classFileName varible;
return 0;
}
Hope this is what you where asking!
NOMAD
-
Mar 2nd, 2003, 07:27 PM
#3
Thread Starter
Member
Thanks!!
That's exactly what I was wondering. Thanks!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|