Retourner au contenu associé (entrée de forum : Structures...)
Posté par Me Nut (site web personnel) le 15 septembre 2004 à 11:31. En réponse au message Structures.... Évalué à 2.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
[^] # Re: On progresse... mais c'est pas encore gagné...
Posté par Me Nut (site web personnel) . En réponse au message Structures.... Évalué à 2.
version de gcc ? chez moi 3.4.2
void wazaa ( struct structure *sss )
{
sss->a = "aaa";
sss->b = "bbb";
sss->c = "ccc";
}
int main ( void )
{
struct structure *test;
test = malloc ( sizeof ( struct structure ) );
test->a = malloc ( 20 * sizeof ( char ) );
test->b = malloc ( 20 * sizeof ( char ) );
test->c = malloc ( 20 * sizeof ( char ) );
test->a = "a non initialise";
test->b = "b non initialise";
test->c = "c non initialise";
print_struct ( test );
wazaa ( test );
print_struct ( test );
return ( 0 );
}