简体   繁体   English

AnsiString header 文件

[英]AnsiString header file

I am migrating from an old version of Borland C++ to the newest.我正在从旧版本的 Borland C++ 迁移到最新版本。 In my code I had used String (AnsiString).在我的代码中,我使用了字符串(AnsiString)。 In the new compiler it does not recognize String or AnsiString as a valid type, so I put in vcl.h in the file where I use String.在新编译器中,它不会将 String 或 AnsiString 识别为有效类型,因此我将 vcl.h 放入使用 String 的文件中。 Now I get 103 errors, all saying "reference to byte is ambiguous" (various system.h files).现在我收到 103 个错误,都说“对字节的引用不明确”(各种 system.h 文件)。 Is vcl.h not the header for AnsiString? vcl.h 不是 AnsiString 的 header 吗?

thanks谢谢

The actual header file that defines AnsiString is dstring.h , and always has been (the header file that defines UnicodeString is ustring.h ).定义AnsiString的实际 header 文件是dstring.h ,并且一直是(定义UnicodeString的 header 文件是ustring.h )。 The System::String alias is defined in sysmac.h . System::String别名在sysmac.h中定义。

vcl.h includes these headers for you. vcl.h为您包含这些标头。 If you are getting errors, either you did not create a VCL project properly to begin with, or your project is misconfigured.如果您遇到错误,可能是您一开始没有正确创建 VCL 项目,或者您的项目配置错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM