1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

split text

Discussion in 'C' started by qiqinuinaifen128, Dec 26, 2007.

  1. qiqinuinaifen128

    qiqinuinaifen128 New Member

    Joined:
    Dec 10, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Co-ordinator of swimming lessons
    Location:
    Singapore
    Home Page:
    How can i split the text that key in by user, for example if the user key in "MoveForward To 123", how can i split the "MoveForward" to one field, "To" in to one field and 123 in to another field..

    below is my simple print and scanf

    Code:
    char y;
    printf("Please Enter Your Command:");
    scanf("%s", &y);
    
    Thank You
     

Share This Page