Home › C++ Tutorial › C++ data types
C++ data types
Sizes and kinds.
int, double, float, char, bool, string. Check sizes with sizeof.
Example code
#include <iostream>
using namespace std;
int main() {
cout << sizeof(int) << " " << sizeof(double) << " " << sizeof(char) << " " << sizeof(bool) << endl;
return 0;
}