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
~337 People Reached
Favorite Forums
Favorite Tags
c++ x 3
c x 2
Member Avatar for pitbro

Could you please help me? what is wrong with this code? it prints only D->D->D->D (I want A->B->C->D) [code=c++] #include <stdio.h> #include <stdlib.h> #include <string.h> #include <malloc.h> struct node /* Declaration of structure "node" */ { char letter[1]; struct node *next ; }; struct node *start = NULL; main(void) { …

Member Avatar for Ancient Dragon
0
152
Member Avatar for pitbro

This doesn't work. Please help. (line 8: invalid conversion from `const char' to `const char*' ) const char *alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; int i=0; do { new_ptr = (struct node *)malloc(sizeof(struct node)); new_ptr->next = NULL; if (start == NULL) { strcpy(new_ptr->letter, alphabet[i]); start = new_ptr; current = new_ptr; } else { strcpy(new_ptr->letter, alphabet[i]); …

Member Avatar for WaltP
0
92
Member Avatar for pitbro

is there a quicker way to fill the list with A,B,C,...,Y,Z whithout doing all this? 1. #include <stdio.h> 2. #include <stdlib.h> 3. #include <string.h> 4. #include <malloc.h> 5. 6. struct node /* Declaration of structure "node" */ 7. { 8. char letter[1]; 9. struct node *next ; 10. }; 11. …

Member Avatar for pitbro
0
93