Stack implementation using function pointers in C

Thread Solved

Join Date: Jun 2007
Posts: 2
Reputation: coolguy_003 is an unknown quantity at this point 
Solved Threads: 0
coolguy_003 coolguy_003 is offline Offline
Newbie Poster

Stack implementation using function pointers in C

 
0
  #1
Jun 28th, 2007
Hi,
I did the stack implementation using arrays and i would like to do it with function pointers but i have no idea. If anyone could help by illustration that would be great as function pointers is pretty difficult for me!

Thanks in advance.
coolguy
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 539
Reputation: thekashyap will become famous soon enough thekashyap will become famous soon enough 
Solved Threads: 50
thekashyap's Avatar
thekashyap thekashyap is offline Offline
Posting Pro

Re: Stack implementation using function pointers in C

 
0
  #2
Jun 29th, 2007
Here is a link that gives you links for function pointer tutorials.
http://www.google.com/search?q=funct...inter+tutorial
Given you've already implemented stack, you already know that part. If you are looking for something more specific, you'll have to make the question specific.
Are you Agile.. ?
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2,039
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: Stack implementation using function pointers in C

 
0
  #3
Jun 29th, 2007
I am very confused. How in the world are you going to implement a stack using function pointers?
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 8
Reputation: bobs360 is an unknown quantity at this point 
Solved Threads: 1
bobs360 bobs360 is offline Offline
Newbie Poster

Re: Stack implementation using function pointers in C

 
0
  #4
Jun 29th, 2007
Man you surely need prayers not just answers, I wish I could help, My thoughts with you!
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,600
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 462
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Stack implementation using function pointers in C

 
0
  #5
Jun 29th, 2007
> I am very confused. How in the world are you going to implement a stack using function pointers?
I guess he means by using dynamic memory allocation, using a node structure which holds the data as well as the pointer to the next node.
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2,039
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: Stack implementation using function pointers in C

 
0
  #6
Jun 29th, 2007
That doesn't involve function pointers though

Mentioning function pointers must be a sign of being completely lost, since there's only a finite constant set of values a function pointer can attain in any given executable; you might as well implement a stack using a bounded set of integers, or something crazy like that.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 2
Reputation: coolguy_003 is an unknown quantity at this point 
Solved Threads: 0
coolguy_003 coolguy_003 is offline Offline
Newbie Poster

Re: Stack implementation using function pointers in C

 
0
  #7
Jun 29th, 2007
Hi thekashyap,
Your links are a saver. I tried previously for links but could get only two.
I was just trying to do basic stack operations of push and pop.
Thanks again for the links and also for the quick reply.

coolguy
Last edited by coolguy_003; Jun 29th, 2007 at 9:15 pm.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC