c++输出struct的成员值

struct UserRecord
  {
   //--- common settings
   int               login;                      // login
   char              group[16];                  // group
   char              password[16];               // password
   //--- access flags
   int               enable;                     // enable
   int               enable_change_password;     // allow to change password
   int               enable_read_only;           // allow to open/positions (TRUE-may not trade)
   int               enable_otp;                 // allow to use one-time password
   int               enable_reserved[2];         // for future use
   //---
   char              password_investor[16];      // read-only mode password
   char              password_phone[32];         // phone password
   char              name[128];                  // name
   char              country[32];                // country
   char              city[32];                   // city
   char              state[32];                  // state
   char              zipcode[16];                // zipcode
   char              address[96];                // address
   char              lead_source[32];            // lead source
   char              phone[32];                  // phone
   char              email[48];                  // email
   char              comment[64];                // comment
   char              id[32];                     // SSN (IRD)
   char              status[16];                 // status
   __time32_t        regdate;                    // registration date
   __time32_t        lastdate;                   // last coonection time
   //--- trade settings
   int               leverage;                   // leverage
   int               agent_account;              // agent account
   __time32_t        timestamp;                  // timestamp
   int               last_ip;                    // last visit ip
   //--- trade data
   double            balance;                    // balance
   double            prevmonthbalance;           // previous month balance
   double            prevbalance;                // previous day balance
   double            credit;                     // credit
   double            interestrate;               // accumulated interest rate
   double            taxes;                      // taxes
   double            prevmonthequity;            // previous month equity
   double            prevequity;                 // previous day equity
   double            reserved2[2];               // for future use
   //---
   char              otp_secret[32];             // one-time password secret
   char              secure_reserved[240];       // secure data reserved
   int               send_reports;               // enable send reports by email
   unsigned int      mqid;                       // MQ client identificator
   COLORREF          user_color;                 // color got to client (used by MT Manager)
   //---
   char              unused[40];                 // for future use
   char              api_data[16];               // for API usage
  };

UserRecord       *m_users;//声明结构变量

m_users = manager->UserRecordsRequest(login1010, total);//调用方法赋值

printf("address for the email of 1010 is:%s",m_users->email);

 

你可能感兴趣的:(C++)