在vs2012里面使用c代码
1 创建testc.h 和testc.c文件
vs 创建testc.c,创建cpp文件时改后缀为c
2 文件内容如下
testc.h
#ifndef _TESTC_H_
#define _TESTC_H_
#include <stdio.h>
#include <stdlib.h>
int mysum(int a,int b);
#endif
testc.c
#include "testc.h"
int mysum(int a,int b){
return a + b;
}