thanks for the help.
Type: Posts; User: jmoney
thanks for the help.
i understand what you mean but how do i keep it from moving to a new character each time?
well it seems as if the first two things that are supposed to be in the stack are there, but none of the others are going in. can you see a reason why this could be? is my loop messed up?
here is my attempt. i don't know if i'm doing any of this right. i don't get any errors but it doesn't seem to be working right. how can i print my stack to see if the right stuff is going in?
...
i need some help. i have to make a program that will read the characters "{ } [ ] ( ) < >" from a file and the pop only those characters onto a stack. can anyone help me with this?
nevermind, i figured it out. thanks to whoever helped.
>>After that I would loop over a call to fgetc until I reached EOF and if I see that certain character, increment a counter.
how do i do that?
this is what i have:
int main ()
{
...
yeah i guess it works either way
thanks
well how would i be able to put a user specified file in there? would it be c:filename?
when i try to open a file for example c:\file.txt it will not open. here is my code.
int main ()
{
char c; /* User defined character */
char filename[50];
int num =...
thanks but i have another dumb question. say the file i want to open is C:\file.txt. what would the user have to type in to use that file? i tried run what you showed me to see how it worked and i...
how exactly do you use fgetc and gets? sorry for the stupid questions.
i need help with:
1) getting a string the user types in and using that string to open an input file.
2) reading that input file one character at a time to print out how many times a certain...