========= C++ 구조체 ==========
struct _stCntUser {
char userID[20];
char password[50];
stTime ctime;
char name[30];
Address addr;
char part[20];
char level[20];
char auth[2];
char telnum[20];
char faxnum[20];
char email[50];
};
typedef struct _stCntUser stCntUser;
struct _stRspList{
Unsigned Int type;
Unsigned Int num;
Unsigned Int pos;
union{
stCntUser users[50]; ===> 이부분을 델파이로 변환해줘야함... 밑으로..
};
======= Delphi ==========
// 사용자 조회
stCntUser = Record
userID : array[0..19] of char;
password : array[0..49] of char;
ctime : stTime;
name : array[0..29] of char;
addr : Address;
part : array[0..19] of char;
level : array[0..19] of char;
auth : array[0..1] of char;
telnum : array[0..19] of char;
faxnum : array[0..19] of char;
email : array[0..49] of char;
end;
stRspList = Record
ttype : Longword;
num : Longword;
pos : Longword;
Case Integer of ===>위의 부분을 델파이로 변화시켜준 것임...
1 : array[0..MAX_USER] of stCntUser; 그런데 에러가 발생.. 요기서..
end;
왜 그럴까엽... 아시면 답변좀... ㅠ.ㅠ
1 : (users: array[0..MAX_USER] of stCntUser);
이렇게 바꾸시져 변수명(users)이 없어서 그런것 같네요 더불어 양쪽에 괄호 치고요
왕초보 wrote:
> ========= C++ 구조체 ==========
> struct _stCntUser {
> char userID[20];
> char password[50];
> stTime ctime;
> char name[30];
> Address addr;
> char part[20];
> char level[20];
> char auth[2];
> char telnum[20];
> char faxnum[20];
> char email[50];
> };
> typedef struct _stCntUser stCntUser;
>
> struct _stRspList{
> Unsigned Int type;
> Unsigned Int num;
> Unsigned Int pos;
>
> union{
> stCntUser users[50]; ===> 이부분을 델파이로 변환해줘야함... 밑으로..
> };
>
>
> ======= Delphi ==========
>
> // 사용자 조회
> stCntUser = Record
> userID : array[0..19] of char;
> password : array[0..49] of char;
> ctime : stTime;
> name : array[0..29] of char;
> addr : Address;
> part : array[0..19] of char;
> level : array[0..19] of char;
> auth : array[0..1] of char;
> telnum : array[0..19] of char;
> faxnum : array[0..19] of char;
> email : array[0..49] of char;
> end;
>
> stRspList = Record
> ttype : Longword;
> num : Longword;
> pos : Longword;
> Case Integer of ===>위의 부분을 델파이로 변화시켜준 것임...
> 1 : array[0..MAX_USER] of stCntUser; 그런데 에러가 발생.. 요기서..
> end;
>
>
> 왜 그럴까엽... 아시면 답변좀... ㅠ.ㅠ