linux»·¾³ÏÂgethostbynameº¯ÊýÎÊÌâ - C/C++ / CÓïÑÔ
дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
for(x2=0;hp->h_addr_list[x2];++x2)
{
strcpy(AlarmDevIP,inet_ntoa(*(struct in_addr*)hp->h_addr_list[x2]));
}
printf("%s", AlarmDevIP);
}
else
{
printf("get host by name error\n");
}
·¢Ïֵõ½µÄ½á¹û×ÜÊÇ error£¬ÇëÎÊÕâ¸öº¯Êý¶Ô³ÌÐòËùÔڵĻ·¾³ÓÐÒªÇó£¬ÎÒ²âÊÔ»·¾³ÔÚ¹«Ë¾ÄÚÍø£¬ÒªÍ¨¹ýÍø¹Ø²ÅÄܵ½ÍâÍøµÄ£¬ÁíÍâÄØÖªµÀÕâ¸öº¯ÊýµÄʵÏÖÊÇÔõô¸ö¹ý³ÌÂð£¿Ð»Ð»£¡
ûÓгõʼ»¯
int main( void )
{
WSADATA wsadata;
WSAStartup(MAKEWORD(2,2),&wsadata);
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
for(x2=0;hp->h_addr_list[x2];++x2)
{
strcpy(AlarmDevIP,inet_ntoa(*(struct in_addr*)hp->h_addr_list[x2]));
}
printf("%s", AlarmDevIP);
}
else
{
printf("get host by name error\n");
}
return 0;
}
#include <netdb.h>
#include <sys/so
Ïà¹ØÎÊ´ð£º
#include <stdio.h>
#include <graphics.h>
void main()
{
int x0,y0,x1,y1,driver,mode,i;
driver=VGA;
mode=VGAHI;
initgraph(&driver,&mode,&qu ......
×î½üͻȻÏë×Ô¼ºÀ´ÊµÏÖÒ»¸öÎå×ÓÆå³ÌÐò,µ«²»ÖªµÀÔõô¿ªÊ¼,×Ô¼ºÒ²Ã»Ñ§»Í¼Ðκ¯Êý,ÄÜÔÚ¿ØÖÆ̨ÏÂÖ±½ÓдÂð>>>?????
¿ØÖÆ̨£¿±ÈͼÐνçÃæ¸üÂé·³¡£
http://search.download.csdn.net/search/%E4%BA%94%E5%AD%90% ......
//C ½Ó¿Ú
extern "C"
{
TESSDLL_API int __cdecl GetTessText(const char *imagefile, char *text);
}
//ÎÒÔÚC#ÖÐÉùÃ÷
//µ÷ÓÃC DLL Öеĺ¯Êý
[DllImport("OCRapi.dll&quo ......
ÇëÎÊÓÃC»òC++ÈçºÎ±àдÇó½â3Dħ·½µÄ³ÌÐò£¬¸Ã´ÓºÎ¿ªÊ¼£¿
лл¸÷룬°ïæÌáµã½¨Òé°É¡£
http://www.mofang.net/code/176/182/6581.html
ÎÒÖ»ÄÜÍ»ÆÆ60Ã룡°¦¡£
ÎÒ¸Õ¹ý40Ãë
googleµÄandroidÖÐÓиöOpenGL ES + ......
ÎÊÌâ:¹¤µØÉÏÐèÒª³¤¶ÈΪA1µÄ¸Ö½îX¸ù,³¤¶ÈΪA2µÄ¸Ö½îY¸ù,³¤¶ÈΪA3µÄ¸Ö½îZ¸ù......ÒÔ´ÎÀàÍÆ.
ÆäÖÐA1,A2,A3,...³¤¶ÈÈÎÒâÖ¸¶¨,X,Y,Z,...ÊýÁ¿Ò²ÈÎÒâÖ¸¶¨.
µ«²Ö¿âÖеĸֽîΪ±ê×¼³¤¶È,Ö»ÓÐ9Ã׺Í15Ã×Á½ÖÖ³¤¶È,ÊýÁ¿² ......