嗨,我已经用 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/