我正在使用史诗 - >故事 - >任务 - >子任务计划,并试图查看我的所有问题,但......我认为我不能.这是一个例子:
史诗:圣骑士 - 等级60
故事(与Epic相关):进入10级
任务(链接到故事):做1级任务
子任务(链接到上面的任务):Questgiver无效
如果我按史诗或故事排序,我看不到我的子任务.我希望看到完整的层次结构,而不仅仅是它的两个或三个层次......这有可能,不知何故?我觉得我或我的团队不应该单独点击电路板上的每个问题来查看子任务.我希望我只是错过了我面前的设置,或者其他什么.
可能重复:
没有参数的构造函数上没有括号是语言标准吗?
好的,我有一个泡菜.这是一个错误的C2228问题,我看了其他问题和答案,并没有给出的提示似乎对我有用 - 这是我的第一个问题,我是新手,所以请温柔!注意:如果我使用,程序将编译
Wizard wiz0;
Run Code Online (Sandbox Code Playgroud)
但如果我使用,请不要
Wizard wiz0();
Run Code Online (Sandbox Code Playgroud)
我正在使用的这本书告诉我这两个陈述应该是等价的,所以我试图找出为什么我可以使用一个而不是另一个.
首先,当我尝试使用向导wiz0()时出现错误:
1> Chapter5.cpp
1>Chapter5.cpp(14): error C2228: left of '.fight' must have class/struct/union
1>Chapter5.cpp(15): error C2228: left of '.talk' must have class/struct/union
1>Chapter5.cpp(17): error C2228: left of '.setArmor' must have class/struct/union
1>Chapter5.cpp(19): error C2228: left of '.getName' must have class/struct/union
1>Chapter5.cpp(21): error C2228: left of '.castSpell' must have class/struct/union
Run Code Online (Sandbox Code Playgroud)
这是(我认为)Chapter5.cpp的相关代码是:
Wizard wiz0(); //declares a variable (wiz0) of type Wizard.
wiz0.fight();
wiz0.talk();
wiz0.setArmor(10);
cout << "Player's Name: " << wiz0.getName() << …
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用矢量实现创建库存系统,但我似乎遇到了一些麻烦.我正在使用我制作的结构来解决问题.注意:这实际上不是游戏代码,这是一个单独的解决方案,我用来测试我对矢量和结构的知识!
struct aItem
{
string itemName;
int damage;
};
int main()
{
aItem healingPotion;
healingPotion.itemName = "Healing Potion";
healingPotion.damage= 6;
aItem fireballPotion;
fireballPotion.itemName = "Potion of Fiery Balls";
fireballPotion.damage = -2;
vector<aItem> inventory;
inventory.push_back(healingPotion);
inventory.push_back(healingPotion);
inventory.push_back(healingPotion);
inventory.push_back(fireballPotion);
if(find(inventory.begin(), inventory.end(), fireballPotion) != inventory.end())
{
cout << "Found";
}
system("PAUSE");
return 0;
}
Run Code Online (Sandbox Code Playgroud)
前面的代码给出了以下错误:
1> c:\ program files(x86)\ microsoft visual studio 11.0\_vc\include\xutility(3186):错误C2678:二进制'==':找不到带有'aItem'类型左手操作数的运算符(或者没有可接受的转换)
还有更多错误,如果您需要,请告诉我.我敢打赌,这是一件小而愚蠢的事,但我已经被它吵了两个多小时.提前致谢!
<!DOCTYPE html>
<html>
<head lang="en">
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<meta charset="UTF-8">
<title>PHP socket chat</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font: 13px Helvetica, Arial; }
form { background: #000; padding: 3px; position: fixed; bottom: 0; width: 100%; }
form input { border: 0; padding: 10px; width: 100%; margin-right: .5%; }
form button { width: 9%; background: rgb(130, 224, 255); border: none; padding: 10px; }
#messages { list-style-type: none; margin: 0; padding: 0; }
#messages li { …
Run Code Online (Sandbox Code Playgroud) 我有一个我确定是一个简单的问题,但我无法弄清楚.在下面的代码中,我希望能够让案例5在之后重新显示选项.我怎样才能做到这一点?提前致谢!
// Input the race of your character
cout << "Choose a race here: " << endl
<< "1) Human, 2) Elf, 3) Dark Dwarf, 4) Commoner, 5) Race info, 6) Admin Debug Race : ";
cin >> mCharRace;
switch (mCharRace)
{
case 1:
cout << "You have chosen Human!" << endl;
mExpPoints = 999;
mArmor = mArmor + 2;
break;
case 2:
cout << "You have chosen Elf!" << endl;
mAccuracy = mAccuracy + 2;
mWeapon.mDamageRange.mLow = mWeapon.mDamageRange.mLow + …
Run Code Online (Sandbox Code Playgroud) 当我尝试编译以下代码时,我收到此错误:
obj\Debug\main.o||In function `main':|
C:\Users\dmarr\Documents\CSharper\Dallas\CPlusPlus\WHYGODWHYCB\main.cpp|16|undefined reference to `bag::bag()'|
||=== Build finished: 1 errors, 0 warnings ===|
Run Code Online (Sandbox Code Playgroud)
起初,我将bag.h和bag.cpp作为两个单独的文件 - 许多与"Undefined Reference"相关的答案建议将.cpp文件的内容移动到.h文件中 - 所以我做了.但是,编译时我仍然遇到上述错误.
aItem.cpp:
//aItem .cpp implementation file
#include "aItem.h"
#include <iostream>
#include <string>
#include <vector>
using namespace std;
//setting this up default
aItem::aItem()
{
m_itemName = "Default Name";
m_itemType = "Default Type";
m_damage = 9001;
}
void aItem::setName(string name)
{
m_itemName = name;
}
void aItem::setType(string type)
{
m_itemType = type;
}
void aItem::setDamage(int damage)
{
m_damage = damage;
} …
Run Code Online (Sandbox Code Playgroud)