Mega Code Archive

 
Categories / C++ Tutorial / Data Types
 

Display value of char , then display value of char static_cast to void

#include <iostream> using std::cout; using std::endl; int main() {    char *word = "again";       cout << "Value of word is: " << word << endl       << "Value of static_cast< void * >( word ) is: "        << static_cast< void * >( word ) << endl;    return 0; } Value of word is: again Value of static_cast( word ) is: 0x43e000