Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Struct.vcx cMembers
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00546561
Message ID:
00547203
Vues:
13
>>In C++ the structure that I want to create just has:
>>ADDR_REC stack[10];
>Did they give you a header file (.h)? If so, the definition for ADDR_REC might be in there (it might be another structure or any of the basic types, e.g. int, char, double.)
>
>>Since mine just says "stack[10]" how do you think
>> this would be handled in struct.vcx
>It all depends on how ADDR_REC has been defined. Stack[10] means it's an array of ten elements, now we just need to find out what type of elements they are. If the elements are character, then stack[10] will be a string with 10 characters, if the elements are type long, then stack[10] will be a string with 40 characters (10x4.) If the elements are another structure itself then it gets more complicated.
>
>>Any ideas would be greatly appreciated.
>> I'm not a C++ programmer so I'm a little
>> lost here.
>It has been years since I worked with C/C++ myself and I am rusty by now. I was working on some calls to the Windows API last night and I found this excellent web site with lots of API definitions and examples. Take a look at: http://www.news2news.com/vfp/index.php
>
>Also, take a look at: http://fox.wikis.com/wc.dll?Wiki~Win32API~WIN_COM_DNA


Hector,

The ADDR_REC structure is given in the header file as: (any field with a +1 is .NULL. terminated everything else has a length of 1)

typedef struct
{
char detail_code; /* copyright detail code */
char zip_code[5+1]; /* zip code */
char update_key[10+1]; /* update key number */
char action_code; /* action code */
char rec_type; /* record type */
char carr_rt[4+1]; /* carrier route */
char pre_dir[2+1]; /* pre-direction abbrev */
char str_name[28+1]; /* street name */
char suffix[4+1]; /* suffix abbrev */
char post_dir[2+1]; /* post-direction abbrev */
char prim_low[10+1]; /* primary low range */
char prim_high[10+1]; /* primary high range */
char prim_code; /* primary even odd code */
char sec_name[40+1]; /* bldg or firm name */
char unit[4+1]; /* secondary abbreviation */
char sec_low[8+1]; /* secondary low range */
char sec_high[8+1]; /* secondary high range */
char sec_code; /* secondary even odd code */
char addon_low[4+1]; /* add on low */
char addon_high[4+1]; /* add on high */
char base_alt_code; /* base alternate code */
char lacs_status; /* LACS converted status */
char finance[6+1]; /* finance code */
char state_abbrev[2+1]; /* state abbreviation (not filled) */
char county_no[3+1]; /* county number */
char congress_dist[2+1]; /* congressional district */
char municipality[6+1]; /* municip. city/state key (not filled) */
char urbanization[6+1]; /* urb. city/state key */
char last_line[6+1]; /* last line city/state key */
} ADDR_REC;

So ADDR_REC stack[10] is going to be an array of 10 structures. The question is how this will be represented in Christof's struct's class cMember or getcmember() or is this going to be something that the struct class was not designed to handle?

I appreciate the help. I'll take a look at the Wiki page in the event that I have to compose this without the help of the struct class :-(>>>>>

Ed
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform