Thankyou Jo for your quick response.
but still i m getting error:
*************** *************** *************** ******
error C2660: 'ungetc' : function does not take 1 parameters stack.cpp
*************** *************** *************** ******
Actually i am taking input from keyboard so it should return character to the keyboard, but it does not work.
any idea?
cworld...
User Profile
Collapse
-
problem in using ungetch( )
Hi all
I am making an RPN calculator in which i want to read data from input. so i used getchar( ) and able to read character by character. But when the while condition fullfill then it comes out from the loop but retain the next character read from input so i want to ungetch to the input. but it does not work. Plz help me, my code is:
Code:/******** Program for Read_Input Function**********/ # include <stdio.h>
-
-
Thankyou sir,
I am using VC++.I will declare the variable in header file as extern variable. It means i need one header file in which i can declare variables then include the header file in each file. So then do i need to compile each program separately other than main file.
thankyou in advance to clear my doubt once again.
cworld...Leave a comment:
-
-
how to combine more than two programs....
i have written a program in C for RPN calculator. In this i have made four function and a main ( ) and stored in same file. But now i have stored each function in a different C file and one header file and want to run it.
So i am getting some errors. My doubt is that whether i have to run each file before i run Main file OR whether i should make headre file more than one.
I have stored all file in the same folder. Help me !! or suggest... -
Yes ! you first define third array then read the contents from Array 1 and store in array 3 (size 20) then read contents of array 2 then store in array 3 but after 10th position and then you can arrange them in ascending order.
In fact there are many ways of doing this first give your code.
cworld...Leave a comment:
-
can not find line 26 . your code is not understandable! !!!!!!1...Leave a comment:
-
-
yes it is a simple program. i suggest you to read a simple programming book. then you compare two nos save the no which is large and compare it with third and so on .
Once you try then if you face the problem then again ask.
cworldLeave a comment:
-
Thankyou for ur response,
actually i was facing this problem for double type since i am using push and pop command for double type everywhere in my program . Now prob is solved i can use fmod command for this
Thankyou...Leave a comment:
-
Thankyou very much Ganon11,
I was just trying one ther command for modulus and I got my problem solved. This is for the others facing the problem, we can use fmod(double x, double y) command i.e. fmod command which is available in <math.h>
Thankyou for ur reply....Leave a comment:
-
Can we use % operator for double type?
Hello dear
I am writing a program for calculator. I am getting error when I use % operator for remainder because I have used push-pop command for double type. So can i use % for double type? or some other operator ? Suggest me Plz!! -
Thankyou so much horace!
now i understand the concept of getch() and getchar very well
Thanx once again
Regards
cworld...Leave a comment:
-
getch() and ungetch() ?
when i use getch , then it reads the data from the keyboard but it does not display it on screen as in the case of getchar(). So should i use ungetch() or some thing else.
but the program executes well and give output other then the current entered data from the keyboard.
Plz help
Regard
cworld.
No activity results to display
Show More
Leave a comment: