linuxÏÂWSADATA µÄÍ·ÎļþÊÇʲô£¿
RT
#include "SocketObject.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <iostream>
using namespace std;
SocketObject::SocketObject()
{
WSADATA wsaData;
//WORD wVersionRequested;
}
SocketObject ÊÇÒ»¸öÀà
È»ºó±àÒë
../SocketObject.cpp: In constructor ¡®SocketObject::SocketObject()¡¯:
../SocketObject.cpp:24: ´íÎó£º ¡®WSADATA¡¯ÔÚ´Ë×÷ÓÃÓòÖÐÉÐδÉùÃ÷
../SocketObject.cpp:24: ´íÎó£º expected `;' before ¡®wsaData¡¯
make: *** [SocketObject.o] ´íÎó 1
Ïà¹ØÎÊ´ð£º
ÎÒĿǰÔÚ±¾µØµÄlinuxÉÏдÁËÒ»¸öswingµÄ½çÃæ£¬Ïëͨ¹ýÕâ¸ö½çÃæÀ´¿ØÖÆÆäËüµçÄÔµÄlinuxÖØÆô¡£
ÎÒÖªµÀÓÃRuntime.getRuntime().exec("shutdown -r");¿ÉÒÔ¿ØÖƱ¾»úLinuxÖØÆô£¬µ«ÊÇÔõô¿ØÖÆÔ¶³ÌµÄlinuxÖØÆôÄØ£¿ ......
СµÜ×î½üÐèÒªÒ»¸öÓÃsocket»ñÈ¡htmlÎĵµµÄ´úÂ룬µ«ÊÇÀÏÊDz»ÄÜ»ñÈ¡ÍêÕûµÄhtmlÔ´Âë¡£ÔÒò²»Ã÷£¬Íû¸ßÊÖÖ¸µã£¡
C/C++ code:
char *Http_GET(char *host,int port,char *data) //·¢ËÍGETÇëÇó
{
char response[2 ......
ÎÒÔÚLINUXÉÏÓÐÁ½¸öÓû§
Ò» root
¶þ myadmin
¡¾myadmin@localhost~¡¿$ dir
Desktop myphp
[myadminlocalhost~]$ cd myphp¡¢DesktopÄܽøÈ¥ÆäËûµÄϵͳĿ¼½ø²»È¥
Ö»ÓÐÕâÁ½¸öĿ¼ ÎÒÏë½øÈëÆäËûµÄÏ ......
ÏÖÔÚÔÚÓÃImageIconÀ´ÏÔʾͼƬ£¬ÎÒµÄͼƬÊÇ·ÅÔÚeclipseϵÄ"images"Îļþ¼ÐÏ£¬"images"Îļþ¼ÐºÍ¹¤³ÌµÄsrcÎļþ¼ÐÊÇÔÚͬһĿ¼Ï£¬Õû¸ö³ÌÐò¾ÍÊǵ÷ÓÃ"images"Îļþ¼ÐÀïµÄÎļþ·ÅÔÚImageIcon ......