每当我尝试在codelite中运行我的项目时,任何更改我'We让人觉得被忽视了

Whenever I try to run my project in codelite, any changes I've made seem to be ignored

本文关键字:We 任何更 codelite 运行 项目 我的      更新时间:2023-10-16

我的一个例子是,当我在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;
相关文章: