很困惑的问题,大家帮看以下
别人软件生成的。C文件,里面包含:
TSXFIELDINIT LOGIN[] = {
{ "HEAD", 0, 0,
TS_FIXED,
0,
20, 0, "",
0, 0, 0, "" },
{ "TXT_USER", 2, 0,
TS_FIXED,
0,
8, 0, "",
0, 0, 0, "" },
{ "TXT_PWD", 4, 0,
TS_FIXED,
0,
8, 0, "",
0, 0, 0, "" },
{ "TAIL", 6, 0,
TS_FIXED,
0,
20, 0, "",
0, 0, 0, "" },
{ "USER_NAME", 2, 9,
TS_ENTRY,
TF_AUTTAB,
8, 0, "",
0, 0, 0, "" },
{ "USER_PASSWORD", 4, 9,
TS_ENTRY | TS_XMIT,
0,
8, 0, "",
0, 0, 0, "" },
{ "", 0, 0, 0, 0, 0, 0, "", 0, 0, 0, "" }
};
他提供的结构定义如下:
struct tsxfieldinit {
char8 *name; /* field name */
int32 row; /* row number */
int32 col; /* column number */
int32 style; /* field style */
int32 flags; /* field flags */
int32 size; /* field size */
int32 len; /* length of current field data */
char8 *data; /* pointer to field data */
int32 ptype; /* pattern type (0=no pattern,1=visible,2=hidden) */
int32 psize; /* pattern size */
int32 plen; /* length of the current pattern */
char8 *pattern; /* pointer to pattern */
};
我把他放在VC CONSOLE环境下INCLUDE 该。C文件后,出现下面提示:
error C2440: 'initializing' : cannot convert from 'char [5]' to 'signed char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
h:\antenna\antennascr.c(23) : error C2440: 'initializing' : cannot convert from 'char [1]' to 'long'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
h:\antenna\antennascr.c(24) : error C2440: 'initializing' : cannot convert from 'char [1]' to 'long'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
很困惑,大家给看看把