#include <iostream>
int main()
{
using std::cout;
cout << "The size of an int is:\t\t"
<< sizeof(int) << " bytes.\n";
cout << "The size of a short int is:\t"
<< sizeof(short) << " bytes.\n";
cout << "The size of a long int is:\t"
<< sizeof(long) << " bytes.\n";
cout << "The size of a char is:\t\t"
<< sizeof(char) << " bytes.\n";
cout << "The size of a float is:\t\t"
<< sizeof(float) << " bytes.\n";
cout << "The size of a double is:\t"
<< sizeof(double) << " bytes.\n";
cout << "The size of a bool is:\t\t"
<< sizeof(bool) << " bytes.\n";
cout << "The size of a cout is:\t\t"
<< sizeof(cout) << " bytes.\n";
system("PAUSE");
}
sorry i used system("PAUSE") but that is the only code that actually works on Dev-C++
cin.get(); not work
getche(); not work
1 2
std::cout << "Press ENTER to continue..."; not work
std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' );
sleep(5); not work
cin.ignore( numeric_limits<streamsize>, '\n' ); not work
I just don't understand what the question is... Or why you even bothered to post this program... If you're a beginner go read the tutorial on this site. It's very useful.
P.S: cin.get() does work, cin.ignore() works.. basically everything works... except the sleep(5)... because it's Sleep(5); <- notice the capital S