好的,这就是我所拥有的,但我收到一条错误消息:“complexReverseString”:找不到标识符???我哪里错了我看了一遍无济于事
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
ifstream input;
string forward;
cout << "Please enter a string to see its reverse. (Will display reverse twice)" << endl;
input.open("information.txt");
cin >> forward;
//reverseString(forward, findStringSize(forward)); a function I'm not actually calling
input >> forward;
complexReverseString();
input.close();
}
int complexReverseString(string userInput)
{
string source(userInput);
string target( source.rbegin(), source.rend() );
cout << "The reversed string is " << target << endl;
return 0;
}