相关疑难解决方法(0)

在.h文件中声明一个结构并在.c文件中实现

这是我的.h文件:

struct _MyString;  
typedef struct _MyString MyString;
Run Code Online (Sandbox Code Playgroud)

我想在.c文件中声明其成员.

我试过了:

typedef struct MyString{
    char * _str;// pointer to the matrix
    unsigned long _strLength;
    }MyString;
Run Code Online (Sandbox Code Playgroud)

但它不起作用.我如何在.c文件中声明结构的成员?

谢谢

c

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

c ×1