资源描述:
《AdMob集成插页式广告指南教程.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、目的:1、帮助大家对单链表的创建、增、删、改、查、逆置、内存释放的了解和熟悉2、可以结合每一次操作的示意图来帮助理解单链表的操作3、这个是传统的单链表操作,后面还会更新企业用的通用单链表操作实例代码和Linux系统下的单链表操作思想[代码]Server端//server.cpp:Definestheentrypointfortheconsoleapplication.//#include"stdafx.h"#include#include#include#pragmacomment(lib,"ws2_32.lib
2、")//加载ws2_32.dllintg_postion=1;CRITICAL_SECTIONgcc;voidgotoxy(intx,inty);COORDget_xy();voidClearScreen(void);voidClearScreen1(void);DWORDWINAPIsendCustmer(LPVOID);DWORDWINAPIdisplayServer(LPVOID);//oc中block的简介,OS饼状图,环形图//PickerView的封装//OC之简单的登陆界面intmain(){system("cls");HANDLEhThread1=NULL;H
3、ANDLEhThread2=NULL;HANDLEhOut;hOut=GetStdHandle(STD_OUTPUT_HANDLE);WORDatt=FOREGROUND_RED
4、FOREGROUND_GREEN
5、FOREGROUND_INTENSITY
6、BACKGROUND_BLUE;SetConsoleTextAttribute(hOut,att);SMALL_RECTrc={0,0,80,25};SetConsoleWindowInfo(hOut,true,&rc);SetConsoleTitle(L"TheChatTools");ClearScreen();Initi
7、alizeCriticalSection(&gcc);hThread2=CreateThread(NULL,NULL,sendCustmer,NULL,NULL,NULL);hThread1=CreateThread(NULL,NULL,displayServer,NULL,NULL,NULL);HANDLEtHandle[]={hThread1,hThread2};WaitForMultipleObjects(2,tHandle,true,INFINITE);DeleteCriticalSection(&gcc);WSACleanup();CloseHandle(hThre
8、ad1);CloseHandle(hThread2);}DWORDWINAPIsendCustmer(LPVOIDlpParameter){WSADATAwsaData;WSAStartup(MAKEWORD(2,2),&wsaData);//向服务器发起请求sockaddr_insockAddr;memset(&sockAddr,0,sizeof(sockAddr));//每个字节都用0填充sockAddr.sin_family=PF_INET;sockAddr.sin_addr.s_addr=inet_addr("192.168.109.23");//sockAddr.s
9、in_addr.s_addr=htonl(INADDR_ANY);sockAddr.sin_port=htons(1234);charSendBuffer[MAXBYTE];while(1){SOCKETsock;do{sock=socket(PF_INET,SOCK_STREAM,IPPROTO_TCP);if(0!=connect(sock,(SOCKADDR*)&sockAddr,sizeof(SOCKADDR))){Sleep(1);}else{break;}}while(true);memset(SendBuffer,0,MAXBYTE);gotoxy(0,21);
10、ClearScreen1();#if0for(intj=0;j<100;++j){printf_s("");}#endifdo{gotoxy(0,21);gets_s(SendBuffer);}while(0==strlen(SendBuffer));gotoxy(0,g_postion);if(g_postion<20)[代码][GoogleGo]代码packagemainimport("io/ioutil""net/http""net/""fmt""encoding/json")//--------