⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 raincom.cpp

📁 好用的键盘超人源代码
💻 CPP
字号:

#include "stdafx.h"
#include "raindoc.h"

//gobal variables here
int InitSocket;
CRainDoc *PDocument;

//gobal functions here
UINT MapRand(UINT max) 
{
    int arand=rand();
    float map=(float)max/RAND_MAX;
    float retVal=(float)arand*map+0.5f;
    return (UINT)retVal;   //return 0 - max	
}

CString localHostIP()
{
     struct hostent *h;
	 char hostName[100];
     struct in_addr addr;
     CString hostIP; 
			 
	 gethostname(hostName,100);
     h=gethostbyname(hostName);
	 memcpy(&addr, h->h_addr, sizeof(int));
     hostIP=inet_ntoa(addr);
	 
	 return hostIP;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -