sprintf to convert text into numbers?

I already found a way to convert numbers to text, but how would you use sprintf to convert text into numbers? If its not possible using sprintf show me another way.

Comments

  • : I already found a way to convert numbers to text, but how would you use sprintf to convert text into numbers? If its not possible using sprintf show me another way.
    :


    In C++:
    atoi()

    ??????
    ?atoi?
    ??????
    Macro that converts string to integer

    Declaration: int atoi(const char *s);

    Remarks:
    atoi converts a string pointed to by s to int.

    atoi recognizes (in the following order)
    ? an optional string of tabs and spaces
    ? an optional sign
    ? a string of digits

    The characters must match this format:

    [ws] [sn] [ddd]

    In atoi, the first unrecognized character ends the conversion.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion