标签:c++11
1 程序 = 算法 + 数据long long lnum; cout << sizeof(int) << endl; cout << sizeof lnum << endl;// 可以不是用括号 cout << sizeof (lnum) << endl;
//C++98: int n1 = {24};// 给n1赋值为24 //C++11: int n2{24};// 等号也可以省略 int n3{};// 不给值,将初始化为0
int *p1;// C中,强调*p1的类型是int int* p2;// C++中,强调p2的类型是int* int * p3;// 推荐声明方式
#include <stdio.h> #include <time.h> void main() { int sec; printf("Enter the delay time in seconds:"); scanf("%d", &sec); clock_t delay = sec * CLOCKS_PER_SEC; printf("start...\a\n"); clock_t start = clock(); while(clock() - start < delay); printf("done\a\n"); }
class Classy { int m_mem1 = 10; };
标签:c++11
原文地址:http://blog.csdn.net/xufeng0991/article/details/43236251