next up previous
Next: Typumwandlung Up: Objekte, Klassen, Variable, Funktionen, Previous: Variablen

Wie groß sind die Datentypen?

#include <iostream.h>

int main()
{
  cout <<"Sizes of types" << endl;
  cout <<"char          " << sizeof(char) << endl;
  cout <<"short         " << sizeof(short) << endl;
  cout <<"int           " << sizeof(int) << endl;
  cout <<"long          " << sizeof(long) << endl;
  cout <<"float         " << sizeof(float) << endl;
  cout <<"double        " << sizeof(double) << endl;
  cout <<"long double   " << sizeof(long double) << endl;
}


next up previous
Next: Typumwandlung Up: Objekte, Klassen, Variable, Funktionen, Previous: Variablen

© 1997 Gottfried Rudorfer, C++-AG, Lehrveranstaltungen, Abteilung für Angewandte Informatik, Wirtschaftsuniversität Wien, 3/19/1998