设为首页 加入收藏

TOP

C++复习
2017-06-28 10:22:39 】 浏览:7430
Tags:复习

C++复习

#include 
  
   
using namespace std;

typedef unsigned short int USHORT;					//创建别名,可以将下面中使用的unsigned short int都用USHORT替换
const unsigned short int StudentPerClass = 15;		//C++中定义常量使用const 而不应该用define
enum COLOR{RED,BLUE =100 ,GREEN,WHITE =500,BLACK};  //创建枚举常量,RED成为一个符号常量,值为0,后面的依次为100 101 500 501

int main()
{
	std::cout << "Hello World" << std::endl;
	std::cout << '\t';							    // \t为制表符 输出的内容为8个空格
	cout << sizeof(char) << sizeof(short) << sizeof(int) << sizeof(float) << sizeof(long) << sizeof(double) << endl; //124448
	USHORT Width = 5;
	cout << Width << sizeof(USHORT)<
    
   
  
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇C++标准IO操作 下一篇C++ STL容器类vector,list和dequ..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目