每当我尝试在codelite中运行我的项目时,任何更改我'We让人觉得被忽视了
Whenever I try to run my project in codelite, any changes I've made seem to be ignored
我的一个例子是,当我在main中添加一个cout时,当我构建并运行程序时,cout永远不会显示(这是第二行代码,所以我认为问题与代码无关)。
我还应该提到,我没有做这个项目,一个小组成员做了。因此,我不得不创建一个工作空间,并以这种方式添加现有的项目文件。除了我指定的问题之外,其他一切都很有魅力。
我尝试过的一些事情包括构建、重建、停止和恢复构建、关闭和重新打开工作区、关闭和再次打开程序、创建新的工作区、重建项目、重新加载工作区、重新构建工作区和清理工作区。这些都不起作用。我不知道还能做什么。
这里有很多类和头文件,所以我需要一段时间才能将它们全部添加到这里,但现在我将为您提供主要内容:
#include <iostream>
#include "Functions.h"
#include "Charge.h"
#include "Grid.h"
#include "Property.h"
using namespace std;
int main()
{
cout << "Welcome to the world of Monopolyn";
cout << endl << "I can work!"; # This is the cout that I added and was ignored.
//Get the number of players
int numberOfPlayer;
setNumberOfPlayer(numberOfPlayer);
//Get the name of each player
Player *players = new Player[numberOfPlayer];
setNameOfPlayer(players, numberOfPlayer);
//Initialize the map
cout << "Loading...";
//Current map size is 10 grids
int mapSize = 10;
Grid *grids[mapSize];
initializeGrids(grids, mapSize);
//progress is used to record a player's position and whether the player is bankrupt
Progress *progress = new Progress[numberOfPlayer];
initializeProgress(progress, numberOfPlayer);
cout << "Completenn";
//Start a round. Iteration will continue if the game is not over.
//Game is over when only one player is not bankrupt
int round = 0;
bool gameOver = false;
while (!gameOver) {
gameOver = roundStart(round, players, numberOfPlayer, grids, mapSize, progress);
round++;
}
//Print out the winner
printWinner(players, numberOfPlayer, progress);
return 0;
}
语句:cout<lt;endl<lt;"我能工作!"运行良好,它输出您的字符串。好的,你可以试试cout<lt;"我可以工作!"。
订单问题,请尝试
cout << "I can work!" << endl;
相关文章:
- 如果C++类在类方法中具有动态分配,但没有构造函数/析构函数或任何非静态成员,那么它仍然是POD类型吗
- C++:将控制台输出存储在宏中更好吗
- 为什么null std ::可选的被认为小于任何值,而不是更多
- 通过重新加载DLL,避免使用DLL预加载漏洞,任何更好的方法
- 你能在任何独立于架构的低级语言中获得更小的整数吗?
- 任何更快地生成元素并检查它们是否为素数的方法
- 让使用函数指针作为模板参数的任何方法更容易
- 怪异的输出:为什么这段代码会给出任何有意义的输出,更不用说这个了
- 任何帮助使此代码更小的C ++
- 每当我尝试在codelite中运行我的项目时,任何更改我'We让人觉得被忽视了
- 在C++中使用armadillo lib将条目分配到稀疏矩阵中的任何更快的方法
- 除了 setter 和 getter 之外的任何其他方法,它们将执行相同的功能但更好
- 是否有任何情况将对象标记为 const 会导致更好的优化代码(使用优化编译时)
- 有人可以告诉我任何不同的方法来使这段代码更快
- 任何比 pow() 更快的方法都可以在 C++ 中计算 10 的整数幂
- 在c++中,任何更好的方法都可以做到这一点,计算谜题的解决方案(49!结果,49个循环)
- 在for循环内部使用时,是否存在任何异常甚至极端的情况,即后增量实际上比预增量更好
- 是否有任何方法可以阻止命名空间在c++中添加更多的类?
- Lua, c++,任何比lua_open()更深入的好的介绍
- 计算分布流中字符串数的任何更快方法