g++ --version g++ (GCC) 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7) cat ${MuabDibs Codestück} >> test.cpp $ g++ -o tester test.cpp $ ./tester 11 Code: $ cat test.cpp #include <stdio.h> #include <stdlib.h> enum { S_None = 0, S_Barrel = 1, S_Top = 2, S_Under = 4, S_Grip = 8, S_Stock = 16 }; int enmSpaces; int main(void) { enmSpaces = S_Barrel|S_Top|S_Grip; char *acharTempChar; acharTempChar = (char*) malloc(256); if(acharTempChar!=NULL) { sprintf(acharTempChar, "%i", enmSpaces); //outG_Debug->value(acharTempChar); printf("%s\n%i\n", acharTempChar, enmSpaces); free(acharTempChar); } } cat $ABOVE > test.cpp $ g++ -o tester test.cpp $ ./tester 11 11
$ cat test.cpp #include <stdio.h> #include <stdlib.h> enum { S_None = 0, S_Barrel = 1, S_Top = 2, S_Under = 4, S_Grip = 8, S_Stock = 16 }; int enmSpaces; int main(void) { enmSpaces = S_Barrel|S_Top|S_Grip; char *acharTempChar; acharTempChar = (char*) malloc(256); if(acharTempChar!=NULL) { sprintf(acharTempChar, "%i", enmSpaces); //outG_Debug->value(acharTempChar); printf("%s\n%i\n", acharTempChar, enmSpaces); free(acharTempChar); } }
--post tenebras lux, post fenestras tux
Geändert von Master of Disaster (21.01.2004 um 22:19 Uhr)
Foren-Regeln