I just wanted to know if I can point to class using this implementation:
class hello
{
public:
void blah();
};
typedef hello* pointer_to_class_hello;
pointer_to_class _hello p1;
So now, does this new pointer p1 point to the class “hello”?
Does this new pointer p1 point to the class “hello”? No, pointers in C++ point to objects (a class is a type), be it with automatic, static or dynamic storage duration (or to functions). Besides that,
p1is uninitialized, so it doesn’t yet point to any valid location.