Author | Topic |
Toymods Social Secretary
Location: Sydney
Registered: July 2002
|
WAY OT: C programmers, I know there are some of you out there
|
Sat, 24 May 2003 07:47
|
|
Ok, this is waaaay outta left feild i know. But i am desperate.
Im having serious issues comprehending the use of pointers and structures. Im particular with an assignment i have for uni, which is due on monday.
The assignment is to do the following: "allow the user to enter an arbitrarily long string of characters from the keyboard, and when the user types the carriage return character (enter), your program should print all of the characters onto the screen in reverse order".
And it MUST use a stack, in the form of the following structure:
struct node
{
char ch;
struct node *ptr_node;
}
and then use the functions
int pop(struct node **top);
void push(struct node **top, char ch); /* not sure if char ch should be same as in the struct definition */
int is_empty(struct node *top);
The main first hurdle i face is how to read the charcters from the scanf operation into a node struct and then pass it to the push function everytime a character is pushed! Im lost!
HELP!
|
|
|
| Subject | Poster | Date |
|
WAY OT: C programmers, I know there are some of you out there
|
THE WITZL | Sat, 24 May 2003 07:47 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
Ribbo | Sat, 24 May 2003 08:16 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
Ribbo | Sat, 24 May 2003 08:20 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
Ribbo | Sat, 24 May 2003 08:33 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
THE WITZL | Sat, 24 May 2003 09:29 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
stylez | Sat, 24 May 2003 09:30 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
THE WITZL | Sat, 24 May 2003 09:40 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
Ribbo | Sat, 24 May 2003 12:53 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
Ribbo | Sat, 24 May 2003 13:46 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
THE WITZL | Sat, 24 May 2003 14:03 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
Ribbo | Sat, 24 May 2003 15:12 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
shinzui | Sat, 24 May 2003 22:47 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
wilbo666 | Sun, 25 May 2003 00:12 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
shinzui | Sun, 25 May 2003 03:53 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
Nark | Mon, 26 May 2003 07:11 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
THE WITZL | Mon, 26 May 2003 12:35 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
Nark | Mon, 26 May 2003 23:37 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
THE WITZL | Tue, 27 May 2003 02:25 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
Ribbo | Tue, 27 May 2003 08:55 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
Nark | Wed, 28 May 2003 02:39 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
isaac | Tue, 27 May 2003 10:09 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
Ribbo | Tue, 27 May 2003 20:58 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
isaac | Wed, 28 May 2003 02:35 |
|
Re: WAY OT: C programmers, I know there are some of you out there
|
ehendrikd | Wed, 28 May 2003 04:57 |
Current Time:
Wed Jan 22 14:52:59 UTC 2025 |
Total time taken to generate the page: 0.0065610408782959 seconds |