すみません、コードを忘れました
これが間違ったコードです。これを機能させようとしていますが、すべての論理演算子が機能しません。
#include <iostream>
#include <string>
using namespace std;
string repeat;
string repeatnum;
string prompt = "|-[]->";
int main()
{
string entry;
bool Running = true;
while(Running == true)
{
cout << "\n";
cout << prompt;
cin >> entry;
if(entry == "Exit") return 0;
if(entry == "Help") cout << "HELP:\nThsi is a simple program, try an input";
if(entry == "ChangePrompt")
{
cout << "What do you want to change the prompt to?: ";
cin >> prompt;
}
if(entry == "Repeat" || "repeat")
{
cout << "What string do you want to repeat?: ";
cin >> repeat;
cout << "How many times do you want to repeat" << repeat << "(1-9)?: ";
cin >> repeatnum;
if(repeatnum > 0){}
}
}
char f;
cin >> f;
return 0;
}
これが私が得ているエラーです。
Error:
C:\Users\Packard Bell\Desktop\test\main.cpp||In function 'int main()':|
C:\Users\Packard Bell\Desktop\test\main.cpp|29|error: no match for 'operator>' in 'repeatnum > 0'|
||=== Build finished: 1 errors, 0 warnings ===|