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:
    http://www.swimmingclasses.com.sg
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice