What is the use of a void* pointer? It points to a thing that is void ?
So does that mean it is undefined or what? and also if someone can guide me on the following?
from Dietel fiftth edition C++ How To Program
So does that mean it is undefined or what? and also if someone can guide me on the following?
After each input, the stream extraction operator returns a reference to the stream object that received the extraction message (e.g., cin in the expression cin >> grade). If that reference is used as a condition (e.g., in a while statement's loop-continuation condition), the stream's overloaded void * cast operator function is implicitly invoked to convert the reference into a non-null pointer value or the null pointer based on the success or failure of the last input operation. A non-null pointer converts to the bool value TRue to indicate success and the null pointer converts to the bool value false to indicate failure. When an attempt is made to read past the end of a stream, the stream's overloaded void * cast operator returns the null pointer to indicate end-of-file.
Comment