no save
Assistance
Achat
News

Forum | programmation
[C] Maudites structures.....
lami20j, le sam. 11 juin 2005 à 09:13:21
Salut,

Concernant strcpy Yakurena a raison, de toute façon tu as vu aussi dans les faqs de devoloppez.com.
Maintenant que le code que je t'ai donné fonctionne (malheureusement seul) peut être l'erreur ne viens pas de là.

Voilà j'ai divisé le code dans 2 fichiers : a.c et b.c

//a.c
#include <stdio.h>
#include <stdlib.h>
main()
{
test();
}
---------------------------------------------------------

//b.c
test()
{
struct db_integers
{ // Octets
char *boolean; // 1 bit
char *octet; // 1
};
typedef struct db_integers integers;

integers *mysql_integers;
mysql_integers=malloc(sizeof(integers));

mysql_integers->boolean="BOOL";
mysql_integers->octet="TINYINT";

printf("%s\n",mysql_integers->boolean);
printf("%s\n",mysql_integers->octet);
}

après je l'ai compilé
gcc -c a.c
gcc -c b.c
gcc -o ab a.o b.o
Précédentkilian
juin 05
sam3000
juin 05
Suivant
REPONSES
lami20j
juin 05
lami20j
juin 05
Yakurena
juin 05
kilian
juin 05
kilian
juin 05
kilian
juin 05
lami20j
juin 05
sam3000
juin 05
kilian
juin 05
kilian
juin 05
Version Web
Réalisé par RedShift
no save