zhidao.baidu.com/question/585592942815934165.html?fr=index_nav&ssid=24565503350ebc6f3f16d8b5f67d9259.3.1454600049.1.TQ2MDAw2MDAw&uid=1454600041271_56&tj=www_normal_1_0_10_title&step=2
就是这个我在百度知道上提问的。才注册没有分,实在抱歉。
头文件加上#include
头文件的string改成std::string
你什么编译器,看你的图,像auto之类的c++ 11/14语法都没有支持
另外关于你使用头文件的问题,你应该在头文件中写
extern bool upper_if(const string &str);
extern void trans_lower(string &str);
因为它们属于另一个cpp
要不这样试一下看。
//test.cpp文件中的内容:
#include
#include
#include
using namespace std;
#ifndef TEST_H
#define TEST_H
bool upper_if(const string &str);
void trans_lower(string &str);
#endif // TEST_H
用visual studio等编译器来试试。vs2015等,对语法支持比较好