我正试着做一个单词做一个命令。喜欢“/ list”会打开一个清单。 [英] I'm trying to make a certain word do one command. like "/list" would open up a list.
本文介绍了我正试着做一个单词做一个命令。喜欢“/ list”会打开一个清单。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
#include <iostream>
#include <cstdlib>
using namespace std;
#include <iostream>
#include <cstdlib>
using namespace std;
// note C:\Dev-Cpp\include\c++\3.4.2\iosfwd:62 candidates are: std::basic_istream<char,> >& std::basic_istream<char,> >::operator=(const std::basic_istream<char,> >&)
//16 C:\Dev-Cpp\Untitled1.cpp no match for 'operator=' in '(&std::cin)->std::basic_istream<_CharT, _Traits>::operator>> [with _CharT = char, _Traits = std::char_traits<char>](((int&)(&list))) = 1'
int main()
{
system("cls");
system("title Command Game!");
int list;
cout << "Type ''list'' for options. \n\n\n\n\n\n\n\n\n \n";
cin >> list;
if(list == 1);
{
system("color a");
cout << "List: 1. Crack The Code, 2. Exit, 3. Cheats - - - - \n \n \n \n ";
int main;
}
int Code_Command();
int code;
cout << "New Code?";
cin >> code;
if(code == 1);
{
int Exit_Command;
int level1;
}
}
int Exit_Command()
{
system("cls");
int exit;
cout << "Good-Bye!";
cin >> exit;
if(exit == 1);
{
system("PAUSE");
return 0;
}
}
int Cheat_Command()
{
int cheats;
cout << "Cheater. :D";
cin >> cheats;
if(cheats == 1);
{
system("cmd");
system("PAUSE");
return 0;
int level1;
}
}
int level1();
{
system("title Level 1");
cout << "Level 1: EASY. Most people know this word from Marry Poppin's: ";
cin >> supercalafragilisticexpealidocious;
if(supercalafragilisticexpealidocious == 1);
{
int level2;
}
}
int level2();
{
system("title Level 2");
cout << "Level 2: MEDIUM. A giant, well known hacking group of 2010 with no personalities known."
cin >> anonymous;
if(anonymous == 1);
{
int level3;
}
}
THIS WON'T RUN!!! HELP?!</char></cstdlib></iostream>
推荐答案
研究以下几行C ++代码并注意差异:
Study the following lines of C++ code and note the differences:
if(cin >> list = 1);
if(cin >> list == 1);
if(cin >> list == 1)
cin >> list;
if(list == 1)
这篇关于我正试着做一个单词做一个命令。喜欢“/ list”会打开一个清单。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文