易截截图软件、单文件、免安装、纯绿色、仅160KB

一个C++调用C的例子

//cExample.h
#ifndef C_EXAMPLE_H
#define C_EXAMPLE_H
#ifdef __cplusplus
extern "C"
{
#endif
int add(int x, int y);
#ifdef __cplusplus
}
#endif
#endif
---------------------------------
//cExample.c
#include"cExample.h"
int add(int x, int y)
{
 return x + y;
}
---------------------------------
//cppFile.cpp
#include <iostream>
#include"cExample.h"
using namespace std;
main()
{
    cout<<add(2,3)<<endl;
    return 0;
}
--------------------------------
//makefile
cppFile: cppFile.o cExample.o
    g++ -g -o cppFile cppFile.o cExample.o
cppFile.o: cppFile.cpp
    g++ -g -c cppFile.cpp
cExample.o: cExample.c cExample.h
    gcc -g -c cExample.c
clean:
    rm -f *.o cppFile


相关文档:

pro*c makefile 编写

该makefile 只是在linux 中测试过, 若采用hu-ux 只要以下makefile中的gcc 改为aCC  但
hu-ux 未测试
1、首先确定pro*c 工程目录结构
proc/bin
proc/include
proc/lib
proc/src
        src/libsrc
        src/project_src
 &n ......

VB 使用C语言Escape的方法

在C语言中,escape的符号很好用,
比如
 "中国一定强"
这个字串可以写成:
"\x4E2D\x56FD\x4E00\x5B9A\x5F3A"
用字元编码编写程序,在其他不同语言的windows运作时,比较不会有问题。
(我尽量不想在程序中写入中文)
但是vb如果全部要用字元编码写的话,就会很麻烦而且一个一个都要手写成:
ChrW(&H4E2D) ......

使用NDK开发C/C++项目规则(ZT)

使用NDK开发C/C++项目规则
<!-- /* Font Definitions */ @font-face {font-family:宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;}@font-face {font-family:"\@宋体&qu ......

50个C/C++源码网站

C/C++是最主要的编程语言。这里列出了50名优秀网站和网页清单,这些网站提供c/c++源代码。这份清单提供了源代码的链接以及它们的小说明。我已尽力包括最佳的C/C++源代码的网站。这不是一个完整的清单,您有建议可以联系我,我将欢迎您的建议,以进一步加强这方面的清单。
1、http://snippets.dzone.com/tag/c/ --数以千计 ......

C/C++/VC MFC char & int study

测试代码一(VC6.0、C-code):
#include <stdio.h>
void main()
{
 int aa;
 unsigned char j1,j2;
 aa=j1=j2=0;
 aa=49;
 j1=aa;
 printf("j1=%d \n",j1);
 j2=aa;
 printf("j2=%c \n",j2);
}
【分析】:
[1]正如所想象的输出结果:
    j1 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号