1C/C++精品视频集这是我收集的部分C/C++精品视频集.其中部分下载地址:2015-04-13C语言精髓所在——指针的艺术链接:http://pan.baidu.com/s/1hqy78aS密码:nivq2015-04-16C++打造酷炫鼠标-Vico老师.链接:http://pan.baidu.com/s/1c0B6X7y密码:5j3z2015-04-24C++开发最牛贪吃蛇游戏------盛大内部核心技术链接:http://pan.baidu.com/s/1bn6P6Q7密码:1n8e2视频太多没一一上传.可以到我同学初の晴空间寻找直接按住Ctry点击此处即可下面是《《坦克大战》》和《《俄罗斯方块》》坦克大战:(2页到18页)#include<iostream>#include<stdlib.h>#include<windows.h>#include<time.h>#include<conio.h>usingnamespacestd;HANDLEMutex=CreateMutex(NULL,FALSE,NULL);//互斥对象intGameOver=0;intlevel=0;intmap[23][23];//坦克种类,Normal为玩家坦克#defineNormal0#defineRed1#defineBlue2#defineGreen3//方向的宏定义#defineUp0#defineDown1#defineLeft2#defineRight3//地图标记的宏定义#defineEmpty0#definePlayer1#definePlayerBullet2#defineEnemyBullet3#defineEnemy4intKill;3intKillRed;intKillGreen;intEnemyExist;voidSetPos(inti,intj)//设定光标位置{COORDpos={i,j};HANDLEOut=GetStdHandle(STD_OUTPUT_HANDLE);SetConsoleCursorPosition(Out,pos);}voidHideCurSor(void)//隐藏光标{CONSOLE_CURSOR_INFOinfo={1,0};HANDLEOut=GetStdHandle(STD_OUTPUT_HANDLE);SetConsoleCursorInfo(Out,&info);}intsharp[4][12]={{0,1,1,0,1,1,1,2,2,0,2,2},{0,0,0,2,1,0,1,1,1,2,2,1},{0,1,0,2,1,0,1,1,2,1,2,2},{0,0,0,1,1,1,1,2,2,0,2,1},};//此数组用来保存坦克各个方向的形状信息DWORDWINAPIBulletfly(LPVOIDlpParameter);//子弹函数申明voidUpdata();//更新界面信息函数申明classTank//坦克类{private:intDirection;//方向inthotpoint[2];//活动点intSpeed;//速度intFirePower;//火力public:Tank(intdir,inthot1,inthot2,inttyp,intspe,intfirepow)//构造函数{Direction=dir;hotpoint[0]=hot1;hotpoint[1]=hot2;Type=typ;Speed=spe;4FirePower=firepow;}intType;//坦克的种类(详见宏定义)intID;//坦克在MAP中的标记(详见宏定义)intFireEnable;//是否可以开火intLife;//生命值voidRunning();//运行函数intJudge(intx,inty,intID);//判断是否可以绘制坦克voidDrawTank();//重绘坦克voidRedraw();//擦除坦克intGetSpeed()//获取速度{returnSpeed;}intGetFire()//获取火力{returnFirePower;}intGetDirection()//获取方向{returnDirection;}intGetHotX()//获取活动点坐标{returnhotpoint[0];}intGetHotY(){returnhotpoint[1];}voidIncreaseFire()//火力+{FirePower++;}voidIncreaseSpeed()//速度+{Speed++;}voidChangeDirection(intnewD)//改变方向{Direction=newD;}voidChangePos(intx,inty)//改变活动点{5hotpoint[0]=x;hotpoint[1]=y;}};Tankplayer(Right,0,0,Normal,1,1);//玩家Tankenemy(Left,20,0,Red,1,1);//敌人voidTank::DrawTank()//绘制坦克{inti;intnx,ny;if(Type==Red)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);elseif(Type==Blue)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);elseif(Type==Green)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);elseif(Type==Normal)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);for(i=0;i<6;i++){nx=hotpoint[0]+sharp[Direction][i*2];ny=hotpoint[1]+sharp[Direction][i*2+1];SetPos((ny+1)*2,nx+1);//利用sharp数组相对于点x,y绘制形状map[nx][ny]=ID;cout<<"■";}}voidTank::Redraw()//擦除坦克,原理同上{6inti;intnx,ny;for(i=0;i<6;i++){nx=hotpoint[0]+sharp[Direction][i*2];ny=hotpoint[1]+sharp[Direction][i*2+1];map[nx][ny]=Empty;SetPos((ny+1)*2,nx+1);cout<<"";}}intTa...