Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    hobosrock696's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    45
    Reputation
    9
    Thanks
    1
    My Mood
    Mellow
    I thought you get 0xFF when space if pressed.... Now I'm off to find a reliable way to make sure cin never enters a failstate

  2. #17
    zeco's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Canada
    Posts
    683
    Reputation
    12
    Thanks
    78
    My Mood
    Cynical
    I thought space was 0x20. . . Whatever it is, I am almost certain it isn't 0x00 , because Im pretty sure that is just a null character A.K.A \0

    What are we talking about again?

  3. #18
    hobosrock696's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    45
    Reputation
    9
    Thanks
    1
    My Mood
    Mellow
    Yes on the chart I have in front of me both 0x20 and 0xFF are spaces so I guess the terminating character is simply 0x00 or null. We were talking about helping me along with my factoring program which I have finished and its rock solid now thanks to these ways of checking the input.

    One last question though.... does anyone happen to know if c++ allows you to manipulate super large numbers in ways other than using math libraries or writing your own functions to do math with arrays?

  4. #19
    doofbla's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    Biel*****/Germany
    Posts
    369
    Reputation
    10
    Thanks
    179
    My Mood
    Psychedelic
    Anyhow I think 0x00 IS SPACE but you're right to it is at the same time terminating the char

    make the experience and enter in cin>>here a char
    and enter "blablabla thisisspace" and then look in the char.... I got only blablabla and the rest is lost...
    _____________________________________________

    READING TUTORIAL:

    1. READ MY POST
    2. THINK ABOUT MY POST
    3. PRESS THANKS
    4. MAYBE CORRECT MY POSTS :P




    Dijkstra:
    "Computer Science is no more about computers than astronomy is about
    telescopes."


    THANKS BUTTON RIGHT DOWN --->

  5. #20
    zeco's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Canada
    Posts
    683
    Reputation
    12
    Thanks
    78
    My Mood
    Cynical
    Quote Originally Posted by doofbla View Post
    Anyhow I think 0x00 IS SPACE but you're right to it is at the same time terminating the char

    make the experience and enter in cin>>here a char
    and enter "blablabla thisisspace" and then look in the char.... I got only blablabla and the rest is lost...
    That is because "cin >>" uses whitespace to concatenate strings, I shall copy an excerpt from one of my favourite C++ Books:

    Quote Originally Posted by C++ Primer Plus, 5th edition
    The problem lies with how cin determines when you’ve finished entering a string. You can’t
    enter the null character from the keyboard, so cin needs some other means for locating the
    end of a string. The cin technique is to use whitespace—spaces, tabs, and newlines—to delineate
    a string. This means cin reads just one word when it gets input for a character array. After
    it reads this word, cin automatically adds the terminating null character when it places the
    string into the array.
    Correlation does not indicate causation.

  6. The Following User Says Thank You to zeco For This Useful Post:

    doofbla (09-27-2010)

  7. #21
    doofbla's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    Biel*****/Germany
    Posts
    369
    Reputation
    10
    Thanks
    179
    My Mood
    Psychedelic
    ahaaaa ok good to know so thank you
    _____________________________________________

    READING TUTORIAL:

    1. READ MY POST
    2. THINK ABOUT MY POST
    3. PRESS THANKS
    4. MAYBE CORRECT MY POSTS :P




    Dijkstra:
    "Computer Science is no more about computers than astronomy is about
    telescopes."


    THANKS BUTTON RIGHT DOWN --->

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [Help Request] Help Needed with injecting hacks?
    By ShoeStrinqs in forum CrossFire Help
    Replies: 3
    Last Post: 09-01-2011, 07:50 PM
  2. [Help Request] Texture won't work, help needed :(
    By Kikimo900 in forum Combat Arms Mod Help
    Replies: 1
    Last Post: 08-29-2011, 01:28 AM
  3. [Help Request] Help needed!
    By FailBladez in forum Combat Arms Help
    Replies: 8
    Last Post: 08-06-2011, 04:37 AM
  4. [Help Request] Some help needed
    By Julma Henri in forum Combat Arms Mod Help
    Replies: 0
    Last Post: 06-28-2011, 01:25 AM
  5. Simple Chams Help Needed Plz.
    By donbiggy in forum Combat Arms Hacks & Cheats
    Replies: 1
    Last Post: 02-27-2009, 02:04 PM