Stacks

This is a discussion on Stacks within the C Programming forums, part of the General Programming Boards category; what is the output that it prints?.....is it a pattern or something constant?....if you can't tell, put in a system ...

  1. #16
    Registered User
    Join Date
    Sep 2004
    Posts
    719
    what is the output that it prints?.....is it a pattern or something constant?....if you can't tell, put in a system pause or a scanf() or something to make it stop every ten lines or so...

  2. #17
    Registered User
    Join Date
    Jul 2004
    Posts
    46
    I think it's stuck printing "Enter next number:<EOF> to stop", because when I make a remark (*/) out of the second while loop, it's still stuck in the endless printloop.

  3. #18
    Registered User
    Join Date
    Jul 2004
    Posts
    46

    Smile

    I figured out it was due to the EOF define I used.
    I just deleted that & changed it to zero instead , now it works.
    Still can't figure out why it didnt work with the EOF though oh well , thanks for helping everyone!!

  4. #19
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,159
    Quote Originally Posted by Cmuppet
    I figured out it was due to the EOF define I used.
    I just deleted that & changed it to zero instead , now it works.
    Still can't figure out why it didnt work with the EOF though
    You're not even using EOF anywhere in your code and something like scanf() probably uses EOF. You're best off not redefining a C standard #define. You should be able to get rid of your #define altogether.
    If you understand what you're doing, you're not learning anything.

  5. #20
    Registered User
    Join Date
    Jul 2004
    Posts
    46
    I did that allready , & it works fine now

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Please Help Me With This Code Of Implementing Stacks
    By raghu_equinox in forum C Programming
    Replies: 3
    Last Post: 10-19-2006, 07:22 AM
  2. ...multiplication using stacks
    By iiwhitexb0iii in forum C Programming
    Replies: 1
    Last Post: 10-09-2006, 01:28 AM
  3. Avioding Stacks
    By LoafOfBread34 in forum C++ Programming
    Replies: 8
    Last Post: 12-08-2004, 05:20 AM
  4. Dumping singly linked list into 2 stacks.
    By strotee76 in forum C++ Programming
    Replies: 5
    Last Post: 05-16-2004, 05:48 PM
  5. Stacks stacks stacks
    By Unregistered in forum C Programming
    Replies: 4
    Last Post: 06-06-2002, 02:01 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21