Retourner au contenu associé (entrée de forum : Structures...)
Posté par alberthier (site web personnel) le 15 septembre 2004 à 11:24. En réponse au message Structures.... Évalué à 2.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
[^] # Re: Petite erreur
Posté par alberthier (site web personnel) . En réponse au message Structures.... Évalué à 2.
Comme dis plus haut , il faut que tu alloue de la mémoire pour test dans ton main :
test = malloc(sizeof(struct structure));
test->a = malloc (20*sizeof(char));
test->b = malloc (20*sizeof(char));
test->c = malloc (20*sizeof(char));
et écris ta fonction wasaa comme ca :
void wazaa (struct structure * sss)
{
sss->a = "aaa";
sss->b = "bbb";
sss->c = "ccc";
}