Is it possible to creat a linked list of structs?
If so how would this be done?
Advanced thanks
Matt
User Profile
Collapse
-
Passing Value of a struct into a function
Hi,
just a quick question i have a function saving values into my struct, that all works but i do not know how to access these values in a different function to the one that saved them code is below.
typedef struct InputT{
double length;
double startingangle;
double angle;
} Input;
void input(){
Input input;
scanf("%lf", &input.lengt h);... -
Structs
Hi,
I'm trying to search the inputed data, using a second struct and printing the result if the two names match.
Eg i have entered
Joe BROWN 10/10/1000
Chris BROWN 10/10/1000
Joe BROWN 10/10/1000
Matt Brown 10/10/1000
then i enter JOE in the search string, and wish to scan the original struct for all joe's. However i have no idea how to do this, please if anyone could inform me on... -
Getchar problem
Hi,
Sorry this may sound stupid but i cant figure it out.
I was wonder how you use getchar to exit after enter has been pressed a multiple times.
This is what i have but as its within a second while loop every it re-enters it reads the last time enter was pressed and exits. I just need it to allow me to re-enter values a second time.
while(c! = '\n'){
putchar(c);
... -
Getchar
Sorry these may sound like stupid questions but how does getchar work? I know that it reads the data one by one in ASCII code but how can u tell it to store numbers only and print an error message if other characters are used? For an assignment i receive 5 dice values, which are entered, i'm have to display a error message if the numbers are entered with a space between them e.g 1 2 3 4 5 is ok but 1.2.3.4.5 is not. Sorry if this sounds stupid,...
No activity results to display
Show More
Leave a comment: