Howdy, Stranger!

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

Categories

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

  • cip_ryancip_ryan Member Posts: 10
    : 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.
  • Chris BrownChris Brown USAMember Posts: 4,624 ✭✭

    ___ || http://forcoder.org || free ebooks and video tutorials about | Delphi PL/SQL Perl Ruby Visual Basic Swift R JavaScript Java Objective-C MATLAB Scratch PHP Assembly Python C Visual Basic .NET C++ Go C# ABAP Lua Scala Bash Fortran COBOL D Scheme VBScript Crystal Kotlin Awk ML FoxPro Erlang SAS Ada Lisp Rust Clojure LabVIEW Apex Hack F# Logo Prolog Julia Transact-SQL Alice Dart | __

Sign In or Register to comment.