cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
class pointers
class pointers
Feb 19, 2011 at 4:02pm UTC
Blessman11
(370)
I'm trying to create a class pointer that points to another class but I'm having issues. Its not working, my implementation is below
1
2
3
CTile2 qOriginal; CTile2 * qPointer; qOriginal = qPointer;
Feb 19, 2011 at 4:06pm UTC
Athar
(4466)
You can't point to classes in C++, you can only point to class
instances
.
That being said, the third line should be:
qPointer = &qOriginal;
Of course, it would help knowing what you're actually trying to do.
Topic archived. No new replies allowed.