okこれは私が持っているものですが、私は 'complexReverseString'というエラーが表示されています:識別子が見つかりません???私はあなたがそれを呼び出す前に、まず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;
}
あなたの質問には**これは言語**でタグ付けしてください。 – deceze
ループが見えない場合は、ループがないことを意味するものではありません。 –
@KcNorth:コンパイルエラーを理解することは、コンパイルされた言語を学ぶ上で不可欠な部分です。あなたが今日投稿した質問の残りの部分を見ると、間違いなくあなたは[良いC++の本](http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and)を読むべき時です-リスト)。 StackOverflowコミュニティは、あなたに言語やプログラム方法を教えることはできません。このサイトの仕組みではありません。ごめんなさい! – Johnsyweb