阅读988 返回首页    go 阿里云 go 技术社区[云栖]


c++工程包含测试

1.h文件:

#include <stdio.h>

int myAdd(int a,int b);


test.cpp文件:

int myAdd(int a,int b)
{
	return a+b;
}

2.cpp文件:

#include "1.h"

int main()
{
	int x,y;
 	scanf("%d%d",&x,&y);
 	printf("%d\n",myAdd(x,y));
	
	return 0;
}


可以正常运行a+b的功能。。。

最后更新:2017-04-03 05:39:04

  上一篇:go thinkPHP之微理解
  下一篇:go Java测试包Mockito