Printing class address!

Hello everyone,

I have this code which prints the address of the object of a class....bt. what if I want to print the address of the class?

#include <iostream.h>

class har{
};

int main()
{
har a;
cout<<(&a);
}

I would really appreciate if someone can help!

Thanks!!!!!

#include <stdio.h>

printf("%p", &object);

should work. If you insist on a C++ solution, you could do:

#include <stddef.h>

...

cout << (ptrdiff_t)&obj;