?? main.cpp
字號:
#include <iostream.h>
#include "GameServer.h"
int main()
{
unsigned short port=5530;
cout<<"網絡五子棋服務器"<<endl;
cout<<"程序設計:施幸東,胡韡,張亞軍,魏巍"<<endl<<endl;
cout<<"Initializing......";
CGameServer GameServer(port);
if(GameServer.IsOK())
{
cout<<"OK."<<endl;
cout<<"Server IP: "<<GameServer.GetServerIP().c_str()<<endl;
cout<<"Port number: "<<port<<endl;
cout<<"Turning on......";
if(GameServer.TurnOn())
{
cout<<"OK."<<endl;
cout<<"Press ENTER to turn off server......"<<endl;
getchar();
cout<<"Turning off......";
cout<<(GameServer.TurnOff()?"OK.":"Failed.")<<endl;
}
else
cout<<"Failed."<<endl;
}
else
cout<<"Failed."<<endl;
cout<<"Press ENTER to end"<<endl;
getchar();
return(0);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -