gpt4 book ai didi

c++ - Visual C++ 到 Turbo C++

转载 作者:搜寻专家 更新时间:2023-10-31 01:18:15 24 4
gpt4 key购买 nike

您好,我已经用 Visual C++ 编写了一个程序,无论出于何种原因,现在我需要在 Turbo C++ 3.0 中运行/编译同一个程序。

我已经设法从一些来源获得了编译器,但是当我尝试编译我的代码时遇到了很多错误。我已经注释掉“#include stdafx.h”,为ide 中的目录和库设置适当的路径。这些是给我错误的行

#include <list> //Error unable to open include file list

using namespace std; //Declaration syntax error

typedef list<int> itemist; // , expected

bool setPlayerChar(char key); // Type name expected // Declaration missing ;

void generateItemList(piece market[9], itemlist &ilist) // ) expected

bool exit = false; // Undefined symbol 'bool' // statement missing ;

最佳答案

几年前,当 Turbo C++ 3.0 是最先进的技术时,今天的许多 C++ 东西都不存在。没有 STL,没有 <list> ,没有命名空间,甚至没有 bool 类型(通常由宏“BOOL”模拟)。我没记错的话,它只是一个 16 位编译器,是什么给了你额外的“乐趣” int和指针运算。

移植愉快 ;-)

关于c++ - Visual C++ 到 Turbo C++,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7339311/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com