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;
...
Type: Posts; User: mag_chan
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;
...
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...
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 :
...
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 :
...
Sorry Kurt...It's something error in my main program, so that it's wrong return...sorry ...thanks million for your help
Thanks for your reply...but the code can't output 32 when i input 332...thanks
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...
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;
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
thank you very much
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...
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...
/*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 =...
After I declare pLast = NULL, it still return 0 nodes, thanks
why this program return null nodes?? thanks
void CopyStudRecordsFromArrayToLinkedList(StudNodePtr *ppList, STUDENT A[],int total)
{ //Pseudocode:
// Declare a "lastnode" pointer,...
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 =...
typedef struct { int CourseID;
int Prereq1_CourseID;
int Prereq2_CourseID;
} PREREQ;
#define TOTAL 20
//The list of courses and...
if i input the number '2' twice...how can the program to remove the first '2' that i input??Thanks
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...
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...