Chinaunix首页 | 论坛 | 博客
  • 博客访问: 365604
  • 博文数量: 284
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1707
  • 用 户 组: 普通用户
  • 注册时间: 2014-05-14 16:38
文章分类

全部博文(284)

文章存档

2015年(6)

2014年(278)

我的朋友

发布时间:2014-09-05 14:40:25

该程序主要是C++与Lua之间的相互调用示例。执行内容:(1)新建一个lua_State(2)打开常用库,如io,os,table,string等(3)注册C函数(4)导入程序所在目录下所有*.lua文件(5)调用Lua中的MainEntry()函数我们可能在lua_functions.cpp文件中加入我们新增的C函数,将C++与Lua结合为一个更强大的程序。下载到本地.........【阅读全文】

阅读(485) | 评论(0) | 转发(0)

发布时间:2014-09-05 14:35:51

1. [代码][C/C++]代码     //Event.h  #ifndef _EVENT_H_#define _EVENT_H_class EmptyObject {};template<typename F>class Event{public: Event()  :m_pObjectPtr(NULL),  m_pMemeberFunctionPtr(NULL) { } virtual ~Event() {  if .........【阅读全文】

阅读(390) | 评论(0) | 转发(0)

发布时间:2014-09-05 14:33:48

用于Gvim 或 Vim 配置文件的一键编译与运行函数(注:需要机器上安装了GCC才行) 本代码只加入了对C/C++的编译与运行,如果要加入其语言的可以参考此代码加入即可 同时,本代码加入了对Windows下用Gvim编译UTF-8编码格式的源文件时中文乱码的解 决方法(也就是在编译选项中加入了 “-fexec-charset=gbk”.........【阅读全文】

阅读(743) | 评论(0) | 转发(0)

发布时间:2014-09-04 15:17:49

1. [代码][C/C++]代码     服务端:////  main.m//  server////  Created by mac on 13-4-15.//  Copyright (c) 2013年 mac. All rights reserved.// #import <Foundation/Foundation.h>#import <sys/types.h>#import <sys/socket.h>#import <netinet/in.h>#imp.........【阅读全文】

阅读(461) | 评论(0) | 转发(0)

发布时间:2014-09-04 15:16:08

1. [代码][C/C++]代码    /* * Copyright (c) 2011, Jim Hollinger * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: *&nb.........【阅读全文】

阅读(798) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册