Почему не отображается адрес данных типа char?

class Address {
      int i ;
      char b;
      string c;
      public:
           void showMap ( void ) ;
};

void Address :: showMap ( void ) {
            cout << "address of int    :" << &i << endl ;
            cout << "address of char   :" << &b << endl ;
            cout << "address of string :" << &c << endl ;
}

Результат:

         address of int    :  something
         address of char   :     // nothing, blank area, that is nothing displayed
         address of string :  something 

Почему?

Еще одна интересная вещь: если int, char, string находятся в public, то вывод будет

  ... int    :  something 
  ... char   :   
  ... string :  something_2

something_2 - something всегда равно 8. Почему? (не 9)

50
задан Kevin Reid 2 June 2013 в 03:56
поделиться