文件修改后没保存,保存一下再编译运行
调试输出下,看看x是多少,感觉输入错了
不知道你这个问题是否已经解决, 如果还没有解决的话://test.c
#include <stdio.h>
#include "test.h"
void print(){
printf("ok\n");
}
//main.cpp
#include <iostream>
#include "test.h"
using namespace std;
int main()
{
print();
return 0;
}