Search:

Type: Posts; User: mag_chan

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    1,550

    maketree code as below : NodePtr...

    maketree code as below :



    NodePtr maketree(char name[]) //create a new node.
    { NodePtr p;
    p= (NodePtr)LoggedMalloc(sizeof(struct node));
    p->name[SIZE] = name[SIZE];
    p->right = NULL;
    ...
  2. Replies
    6
    Views
    1,550

    INPUT : MARY 11122 this program is to build a...

    INPUT : MARY 11122

    this program is to build a tree (eahc node has 3 sons : left called 1, middle called 2, and right called 3. According to the input of id : 11122. First, build a root node, then...
  3. Replies
    6
    Views
    1,550

    Can you give me some hints?

    The program is to build a node tree , then print it out as follow format, can anyone give me some hints or any reference web site about doing this, thanks.

    (the symbol '+' are spaces)
    output :
    ...
  4. Replies
    1
    Views
    1,010

    Can you give me some hints?

    The program is to build a node tree , then print it out as follow format, can anyone give me some hints or any reference web site about doing this, thanks.

    (the symbol '+' are spaces)
    output :
    ...
  5. Replies
    6
    Views
    1,725

    Sorry Kurt...It's something error in my main...

    Sorry Kurt...It's something error in my main program, so that it's wrong return...sorry ...thanks million for your help
  6. Replies
    6
    Views
    1,725

    Thanks for your reply...but the code can't output...

    Thanks for your reply...but the code can't output 32 when i input 332...thanks
  7. Replies
    6
    Views
    1,725

    get all the right digits

    How can i get the all right digit.... eg. input digit is 332, output is 32. Please see the below code and help me thanks



    //Get all the right digits
    int getRightDigit(int id)// eg. 332
    { int...
  8. Replies
    3
    Views
    1,062

    below is my code, but it can get the first digit...

    below is my code, but it can get the first digit only????thanks



    int getFirst(int n)
    { int rtn;
    if (n<0)
    return n;
    rtn = getFirst(n/10);
    return rtn;
  9. Replies
    3
    Views
    1,062

    Recursion problem

    How can i use recusion to get the below number, the number should not in a fixed length....thanks

    eg. input 3456
    first time get : 3
    second time get : 34
    third time get : 345
  10. Replies
    2
    Views
    5,677

    thank you very much

    thank you very much
  11. Replies
    2
    Views
    5,677

    get digit from left to right

    I want to write a program that can get the left most digit each time , the below program can get the the left most digit at first, but how can i get the others eg. input digit 33332.....Please...
  12. Replies
    2
    Views
    3,804

    Stack in linked list

    There are 3 errors in my program, what do they mean??Thanks

    error LNK2001: unresolved external symbol _pop
    error LNK2001: unresolved external symbol _push
    Debug/CheckBrackets.exe : fatal error...
  13. Circular doubly linked list with dummy header

    /*Create and return a doubly linked list (circularly linked)
    with dummy header node and 2 data nodes (values are 1 and 2) */
    NodePtr SetupListWithDummyAnd2DataNodes()
    { NodePtr pA =...
  14. Replies
    3
    Views
    3,530

    After I declare pLast = NULL, it still return 0...

    After I declare pLast = NULL, it still return 0 nodes, thanks
  15. Replies
    3
    Views
    3,530

    copy array to linked list

    why this program return null nodes?? thanks



    void CopyStudRecordsFromArrayToLinkedList(StudNodePtr *ppList, STUDENT A[],int total)
    { //Pseudocode:
    // Declare a "lastnode" pointer,...
  16. Replies
    13
    Views
    4,756

    dynamic memory allocation

    how can i hardcode data into the records,thanks...




    void Handle_Array_Dynamic()
    { //it dynamically allocates for an array of 10 student records
    int i;
    int *A;
    A =...
  17. Replies
    7
    Views
    3,875

    Get Position in array

    typedef struct { int CourseID;
    int Prereq1_CourseID;
    int Prereq2_CourseID;
    } PREREQ;

    #define TOTAL 20

    //The list of courses and...
  18. Replies
    9
    Views
    1,233

    if i input the number '2' twice...how can the...

    if i input the number '2' twice...how can the program to remove the first '2' that i input??Thanks
  19. Replies
    9
    Views
    1,233

    Run-time error

    I want to write a program to remove the first smallest number that i input..

    input 6 integer from keyboard, they are 12 15 2 16 2 4

    how can i amend the program that can remove the first '2' and...
  20. Replies
    2
    Views
    1,092

    display problem

    how can i chop the third line of the output...thanks

    data read from file as below:
    1231252 Peter(new line)
    1548587 Mary(new line)

    output as below:
    1231252 Peter
    1548587 Mary...
Results 1 to 20 of 21