Hunter的大杂烩 技术学习笔记

June 5, 2006

struct to class convertor

Filed under: C++ — hunter @ 1:33 pm

下载

用于将struct 结构转换为 class 类声名

#ifndef SAMPLE_STRUCT_H
#define SAMPLE_STRUCT_H

#include

/* dfasdf */
//asdfasdf
typedef struct
{
    int  dwAbc; /* dfasdf */
    char cAbcd;
    int  adwAbcde[16];
}HAHA;
struct HAHA_1
{
    int  dwBbb; // asdfaf
    char cKkkk;
};

typedef struct _WAHAHA_{
    int  dwTestInt;
    char *strUserName;
    char  strUserNick[111];
}HAHA;

#endif
 

——————————————————————-

class CHAHA
{
private:
public:
        const int* GetAbcde();
        void SetAbcde();

        uint8_t GetAbcd();
        void SetAbcd();

        int GetAbc();
        void SetAbc();

};
class CHAHA_1
{
private:
public:
        uint8_t GetKkkk();
        void SetKkkk();

        int GetBbb();
        void SetBbb();

};
class C_WAHAHA_
{
private:
public:
        const char* GetUserNick();
        void SetUserNick();

        const char* GetUserName();
        void SetUserName();

        int GetTestInt();
        void SetTestInt();

};

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress