- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
- Interests
- Running, swimming
- PC Specs
- i5 750 / Debian Squeeze / Win7
12 Posted Topics
Re: Why do you need a two level pointer? Isn't a single level enought? | |
Re: Hello, In the beigin of your program: line 54 and line 58: Are you sure that you have to use "&" to store data in a char array with fscanf? And to print the content of the "s" variable with printf, you don't need to use &s, you juste have … | |
Re: You might look your function [B]void delete_at_end(nodepointer &head)[/B], [B]head[/B] type is [B]struct node[/B], but in your [B]main[/B] function, you gave to [B]delete_at_end[/B] a [B]struct node *[/B] variable. It might be a reason why your program doesn't works (and I think your [B]push()[/B] function doesn't works too). | |
Re: I think you program might be easier to read and modify if you put some part of code in fonction other than main(). for exemple: [CODE] void print_main_menu(void) { SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE), FOREGROUND_BLUE); printf("WELCOME TO CHEMY'S CHEMISTRY"); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), BACKGROUND_RED | BACKGROUND_INTENSITY); printf("\nMAIN MENU\n"); printf("*********\n\n"); printf("Please select option: \n"); printf("[c]CHEMISTRY QUIZ\n"); … | |
Re: Hello jdm, What does your programs actually: The server It is just waiting for incomming connection, and when a connection is done, it sends a string to the client after what he close the connection and wait for the next incomming connection. The client It connects the ther server, print … | |
Re: There is few mistakes in your program: What's happen if you tried to add more than 20 entries? What's happen when you have two (or more) entries with the same Name value and you try to delete one of them? So I suggest you four tips: -- try to use … | |
Re: [CODE] #include<stdio.h> #define SIZE 100 int getline(char * line, int lim); int getline(char * line, int lim) { int i; char c; for(i=0; i<lim-1 && (c=getchar()) !='\0'; ++i) { *(line+i) = c; } /* you already saved c in line[i] if(c=='\n') { line[i]=c; ++i; }*/ line[++i]='\0'; return i; } main() … | |
Re: When you do "scanf("%c", &a);" you save only one character, so you can't use "printf("%s", &a);" to display the character saved in "a", if you execute this code, a segfault might append. To display the caracter in "a", you have to use "printf("%c", a);". | |
Re: If you work with a Linux OS, this functions are system call, you might find them in the kernel source code | |
Re: Hi, if you want to get a web page with http protocol, you will have to send a request first, and then the server will answer back with the web page. When you conect to the server, your program will be the master, so you will have no answer before … | |
Re: Hi, According to VernonDozier, you might use structure with a char array and two integer. You build and array with this strucure, then, for every line, you will have to use: [CODE] sscanf(line, "%s %d %d", struct_abc[i].char_array , &(struct_abc[i].first_int), &(struct_abc[i].second_int));[/CODE] Hope it help you |
The End.