You cannot have pointers to classes. The language does not support it. You can have pointers to class references, and you can have pointers to structs or the built-in types, but if Foo is a class, then what you can't have a pointer to it. The closest that you can get is that I believe that you can cast class references to and from void*, and that will work, but Foo* is a pointer to a reference to Foo, not a pointer to Foo, and there's no way in the type system
to represent a pointer to Foo.

- Jonathan M Davis

Yes. I want a Pointer of Foo's reference, you're right. I think i have to move the reference to the heap?

Reply via email to