我正在阅读有关引导加载程序的文章,(http://www.codeproject.com/KB/tips/boot-loader.aspx?msg=3745692#xx3745692xx),我发现了这部分内容:
"const char far* inStrSource"
整个内容:
typedef unsigned char byte;
typedef unsigned short word;
typedef unsigned long dword;
typedef char bool;
byte CString::Strlen( const char far* inStrSource )
{
byte lenghtOfString = 0;
while(*inStrSource++ != '\0')
{
++lenghtOfString;
}
return lenghtOfString;
}
请问有人能解释一下,为什么他将char类型定义为bool,并且这个指针是怎么回事?
MVC++ 10将其识别为错误(typedef char bool和char far* intSource),但使用16位VC 1.52编译毫无疑问。
bool
出现之前。 - MSalters