[dcc32 Error] Unit1.pas(57): E2010 Incompatible types: 'PAnsiChar' and 'array[0..260] of Char'
来源:互联网 发布:长春大学网络教学平台 编辑:程序博客网 时间:2024/06/06 12:28
var hostName : array [0..255] of char; begin gethostname(hostName, sizeof (hostName)); end;
产生原因:D2009的Char为宽字符WideChar,而gethostname第一个参数是PAnsiChar。
解决方法:将hostName的声明改成array [0..255] of AnsiChar;即可。
0 0
- [dcc32 Error] Unit1.pas(57): E2010 Incompatible types: 'PAnsiChar' and 'array[0..260] of Char'
- E2010 Incompatible types: 'Array' and 'PAnsiChar'
- E2010 Incompatible types: 'Char' and 'AnsiChar' 错误的处理
- delphi2010中使用pchar时E2010 Incompatible types: 'Char' and 'AnsiChar' 错误的处理
- [Error] MainFrm.pas(107): Incompatible types: 'MAPGISMAPCOMLib_TLB.IMap' and 'EDITVIEWLib_TLB.IMap'
- delphi xe10 内存不足 [dcc32 Fatal Error] Unit3.pas(9): F2046 Out of memory
- Type Incompatible operand types String and int
- Incompatible conditional operand types int and Double
- Incompatible types
- incompatible pointer types assigning to 'int *' from 'char'
- [Pascal Error] Unit1.pas(1): Unable to invoke Code Completion due to errors in source code
- Incompatible types:'TDBGridEh' and 'TDBGrid' 出现这个错误的解决方法
- Failed to merge incompatible data types StringType and BinaryType
- error occurred during initialization of vm incompatible initial and maximum heap sizes specified
- error occurred during initialization of vm incompatible initial and maximum heap sizes specified
- error: invalid operands of types ‘double’ and ‘double’ to binary ‘operator^’
- Delphi XE 3 [dcc32 fatal error] f2046 out of memory 错误的解决方法
- array used and char`s array and string`s array
- Windows 7安装ArcGIS DeskTop10:错误1935
- Mysql 多表联合查询效率分析及优化
- 像程序员一样思考读书笔记 3
- Linux 和 Windows 平台不同的 UCS-2 编码
- NoSQL数据库探讨
- [dcc32 Error] Unit1.pas(57): E2010 Incompatible types: 'PAnsiChar' and 'array[0..260] of Char'
- 《sed & awk》读书笔记之 sed 篇
- stm32应用部分发生中断,PC跳转到IAP中断向量表处后,如何跳转到应用部分中断函数入口的
- 给视图一个像心跳的动画
- 安装win7时手动用命令去创建主分区和逻辑分区
- B-树和B+树的应用:数据搜索和数据库索引
- oracle SQL笔记
- linux下apache开启url重写的方法(详细说明)
- MySQL Order By实现原理分析和Filesort优化