hi
im trying to make a program in linux to call another program doing first a check to see if the HD has the right serial number
i know if i put the serial in some parts of the code is possible to edit the value with a hex editor after compile, so i was thinking about to put the serial on a #define, but isnt working:
comand to compile:Code:#include <stdio.h> #include <stdlib.h> #define TRAVA XXXXXXXXXX2568 int hd () { system("ls /dev/disk/by-id/ |cut -d_ -f3 |head -n 1"); } int main () { if (hd() == TRAVA) system("./game"); else { printf("Erro"); } }
the result:Code:gcc abrir.c -o abrir
Code:abrir.c:14: error: ‘XXXXXXXXXX2568’ undeclared (first use in this function) abrir.c:14: error: (Each undeclared identifier is reported only once abrir.c:14: error: for each function it appears in.)



LinkBack URL
About LinkBacks


