Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~6K People Reached
Favorite Forums
Favorite Tags
c++ x 8
Member Avatar for hur1214

[CODE] #include<iostream> #include<fstream> #include<string> using namespace std; struct phonenode{ char surname[15]; char initals[4]; phonenode *next; }; phonenode *start_ptr = NULL; phonenode *crrnt_ptr; void read_txt(){ ifstream ifs("test.txt"); char surn[15]; char inital[4]; phonenode *temp1, *temp2; temp1 = new phonenode; if (ifs.fail()){ cout << "ERROR" << endl; } while(ifs.good()){ ifs>>surn>>inital; if(ifs.fail()){ break; } …

Member Avatar for kjr247
0
6K
Member Avatar for hur1214

[CODE] phonenode *start_ptr = NULL; phonenode *crrnt_ptr; void alpha_order(){ phonenode *ptr, *curr, *temp; ptr = start_ptr; for(bool didSwap = true; didSwap;){ didSwap = false; for(curr = ptr; curr->next != NULL; curr = curr->next){ if (curr->surname > curr->next->surname){ temp = curr; curr = curr->next; curr->next = temp; didSwap = true; } …

Member Avatar for dkalita
0
91