Results 1 to 7 of 7

Thread: A comment on the F.A.Q.

  1. #1
    denniswrenn
    Guest

    A comment on the F.A.Q.

    stdio.h - use cstdio
    stdlib.h - use cstdlib
    string.h - use cstring



    If you use the cXXXX then you are using standard headers.

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Mm-hmm....yeah, you're right
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Hyperactive Member MPrestonf12's Avatar
    Join Date
    Jun 1999
    Location
    NY
    Posts
    330
    also the atoi and itoa examples are the same.
    Matt

  4. #4
    Lively Member
    Join Date
    Dec 2000
    Location
    Indiana
    Posts
    73

    atoi itoa pretty useless

    If i'm wrong in thinking that atoi and itoa convert ascii to integer, and back, ignore this post.

    Couldnt you just make a macro that adds or subtracts 48 from a number? That would be the most logical thing to do, im my thinking

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    No, you're not wrong. However, the macro approach will only work for a single character. itoa and atoi work with character arrays, for example you pass "54" to atoi, and it returns 54.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  6. #6
    Lively Member
    Join Date
    Dec 2000
    Location
    Indiana
    Posts
    73

    *enlightened*

    I see..... Im used to working in Brainf***, where that is the only way to do it. (adding or subtracting 48, that is)

  7. #7
    Banned
    Join Date
    Feb 2001
    Location
    Back to sh*tland
    Posts
    294

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width