Afficher un message
Vieux 01/07/2008, 21h23   #3
Medvedev
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: I can't read the first byte of an EXE file!!!!!

On Jul 1, 12:05 pm, Goedson Paixao <goed...@gmail.com> wrote:
> Medvedev escreveu:
>
> > i write this code to read the first byte from my EXE and compare it
> > with the entered EXE file
> > the byte read from both files supposed to be the same but that's don't
> > happened!!
> > i tried also with different EXE's but it also failed to read the first
> > byte which is "M"
> > --
> > here is the code:
> > char str1[2];
> > char str2[2];
> > if(str1 == str2)

>
> Here you're comparing the two pointers str1 and str2 (which will never
> be equal). What you want to do is
>
> if (str1[0] == str2[0])
>
> to compare the read bytes.


it works but it don't configure the EXE as i called
fwrite("a",1,1,b);
why?!
  Réponse avec citation
 
Page generated in 0,04868 seconds with 9 queries