The stoX familly of functions should be prefered over the atoX familly of functions because they are way safer security wise (buffer overflows and whatnot). This particularly important here because we're dealing with data from the outside world which we can't trust entirely.