Basic Question from newbie... - General C++


Hi everyone,

First post on this forum so hope this is in the right place, please advise if not.

I'm relatively new to C++ and have been trying to test my knowledge with some online tests. I'm a little stuck on on one with general questions about the C++ language and it's libraries:


Which of the following correctly describe the C++ language and its libraries?

1 - Though one can override the << operator of the ostream class, it is not possible to do so for the ofstream class because it does not use a buffered output stream
2 - The C++ language does not have built in features for persisting or serializing objects to disk and back
3 - It is not possible to declare a pointer to a private data member of a C++ class
4 - It is possible to declare a function pointer to the constructor of a C++ class
5 - If the << operator of the stream class has been templatized, it cannot be specialized



For 1 - I thought it would be possible to override this as it is inherited from ostream?

For 3 - Don't see why you can't declare a pointer to a private data member?

Not sure about 2, 4 & 5 any help appreciated!

Thanks!
1. It is possible.
2. boost::serialization is a library that does this, for example.
3. It is possible within the class itself.
4. C++ standard explicitly prohibits taking the address of a constructor.
5. Templates can be specialized.
Two.
Topic archived. No new replies allowed.