Skip to content

Instantly share code, notes, and snippets.

View autophyte's full-sized avatar

autophyte autophyte

  • Shanghai China
View GitHub Profile
@autophyte
autophyte / tcp_c.c
Created July 19, 2012 04:31
game_robot
//文件:tcp_c.c
//描述:tcp客户端源程序
#include <stdio.h>
#include <winsock2.h>
#pragma comment(lib, "WS2_32.lib")
#define BUF_SIZE 1024
int main(int argc, char* argv) {
WSADATA wsaData;
@autophyte
autophyte / getopt.cpp
Created July 24, 2012 05:32
linux获取参数的for windows
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#define getpid() GetCurrentProcessId()
#ifndef _
/* This is for other GNU distributions with internationalized messages.
When compiling libc, the _ macro is predefined. */
@autophyte
autophyte / random_name.cpp
Created July 24, 2012 05:36
跟据文件中的词随机创建名字
//random_name.cpp
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <vector>
#include <set>
#include <string>
#include <fstream>
#include <stdio.h>
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#include <stdio.h>
#include <string.h>
#include <io.h>
#include "loadcfg.h"
#include "pathstring.h"
#pragma comment(lib, "lua51.lib")
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#include <stdio.h>
#include <string.h>
#include <io.h>
#include "loadcfg.h"
#include "pathstring.h"
#pragma comment(lib, "lua51.lib")