Thread: Line Parsing and this loop

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    7

    Line Parsing and this loop

    The user enters a set of characters, that i copy into an array right.

    Then i have a loop which goes through the characters, and when it finds a space, it breaks

    so i have the if statement for that set up like this...


    if (userentry[index] == ' '){
    break;
    }

    and i have tried varients such as

    asciivalue = 32; /Noting that 32 is a space in ascii/
    pointer = &asciiavalue;
    spacechar = *pointer;

    if (userentry[index] == spacechar){
    break;
    }

    and also..

    spacechar = ' ';
    if (userentry[index] == spacechar){
    break;
    }


    Yet, none of them work, so if anyone has a suggestion, could you please help me?
    Last edited by Joshua-NSW; 11-14-2001 at 02:54 AM.

Popular pages Recent additions subscribe to a feed