close
兩個struct交互使用的宣告問題
(1)先宣告 struct 名稱
(2) 再定義 struct內容
(1)先宣告 struct 名稱
(2) 再定義 struct內容
#include//using namespace std; struct tag_a; /* ............incomplete declaration. */ struct tag_b; typedef struct tag_a A; typedef struct tag_b B; struct tag_a{ struct tag_b *bp; /* ..struct tag_b .............. */ int value; }; struct tag_b{ struct tag_a *ap; int value; }; struct evp_cipher_st; struct evp_cipher_ctx_st; //. ossl_type.h typedef struct evp_cipher_st EVP_CIPHER; typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX; //------------------------------------ //.evp.h struct evp_cipher_st { int (*init)(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc); //...a //const EVP_CIPHER_CTX *ctx; }; struct evp_cipher_ctx_st { const EVP_CIPHER *cipher; //... }; int main(){ return 0; }
全站熱搜
留言列表