#include #include using namespace std; inline void f() {cout << "typical function\n";} inline ostream& g(ostream& ost) {return ost << "g is called, not printed\n.";} int main() { int i = 10; int *p = &i; cout << "The value of p is " << p << ".\n" //printf("%p", p) "The address of i is " << &i << ".\n\n"; cout << f << "\n" << boolalpha << f << "\n" //<< reinterpret_cast(f) << "\n" //won't compile << reinterpret_cast(f) << "\n" << reinterpret_cast(reinterpret_cast(f)) << "\n" << (const void *)f //depricated << "\n\n"; const char *q = "hello"; cout << "q points at the characters \"" << q //printf("%s", q) << "\".\n" "The value of q is " << static_cast(q) << ".\n\n"; cout << g; return EXIT_SUCCESS; }