Search:

Type: Posts; User: yuuki

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    2,911

    thanks but still confuse, the format string is 16...

    thanks but still confuse, the format string is 16 and store %250s, how can i know that %250s is 5 character long? and how can i convert 16 to %10000000000000s?
  2. Replies
    4
    Views
    2,911

    thanks i understand but not to sure about why...

    thanks i understand but not to sure about why format[16]?, if %250s means 250 char,why the array that it is stored to only consist of 16 char? if the user input larger than 16 char? i mean to change...
  3. Replies
    4
    Views
    2,911

    scanf and sprintf

    // enum { SZ = 250 } ;

    char cstr[SZ] ;// prepare format string to read at most SZ-1 characters
    char format[16] ;
    sprintf( format, "%%%ds", SZ-1 ) ; // ie. "%249s" if SZ == 250

    ...
  4. Thread: linked list

    by yuuki
    Replies
    1
    Views
    3,208

    linked list

    struct node* AppendNode(struct node** headRef, int num) {
    struct node* current = *headRef;
    // special case for the empty list
    if (current == NULL) {
    Push(headRef, num); ->why not use...
Results 1 to 4 of 4