Running C/C++ program [message #231827] |
Sun, 09 September 2007 09:56 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: arellano.fiu.edu
I am running a simple C program for testing purposes
The progam is suposed to:
Print "Enter Values"
Receice two numbers from keyboard
Print "worked"
The problem that I have is that "Enter Values" will not print till both
numbers are entered.
What can be wrong,
Wilmer
|
|
|
Re: Running C/C++ program [message #231835 is a reply to message #231827] |
Sun, 09 September 2007 11:14 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: merks.ca.ibm.com
Wilmer,
Maybe you have to flush the stream before the output is displayed.
Wilmer Arellano wrote:
> I am running a simple C program for testing purposes
>
> The progam is suposed to:
>
> Print "Enter Values"
> Receice two numbers from keyboard
> Print "worked"
>
> The problem that I have is that "Enter Values" will not print till
> both numbers are entered.
>
> What can be wrong,
>
> Wilmer
>
|
|
|
Re: Running C/C++ program [message #231850 is a reply to message #231835] |
Sun, 09 September 2007 15:07 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: arellano.fiu.edu
Thanks Ed,
I new to C and eclipse, can you tel me how to flush the stream?
I am running under windows XP with CYGWIN and my code is:
#include <stdio.h>
#include <math.h>
int main(void)
{
int k;
float r;
printf("Enter Values \n");
scanf("%i %e",&k,&r);
printf("worked %i and %3.3e \n",k,r);
return(0);
}
Wilmer
|
|
|
Re: Running C/C++ program [message #231878 is a reply to message #231850] |
Sun, 09 September 2007 18:24 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: merks.ca.ibm.com
Wilmer,
It's been so many years since I've done C/C++ programming. I just did a
google for "c programing flush stream" and it turns up answers...
Wilmer Arellano wrote:
> Thanks Ed,
>
> I new to C and eclipse, can you tel me how to flush the stream?
>
> I am running under windows XP with CYGWIN and my code is:
>
> #include <stdio.h>
> #include <math.h>
> int main(void)
> {
> int k;
> float r;
> printf("Enter Values \n");
> scanf("%i %e",&k,&r);
> printf("worked %i and %3.3e \n",k,r);
> return(0);
> }
>
> Wilmer
>
|
|
|
Re: Running C/C++ program [message #231911 is a reply to message #231850] |
Mon, 10 September 2007 01:55 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: zeeshan.quireshi.gmail.com
Wilmer Arellano wrote:
> Thanks Ed,
>
> I new to C and eclipse, can you tel me how to flush the stream?
>
> I am running under windows XP with CYGWIN and my code is:
>
> #include <stdio.h>
> #include <math.h>
> int main(void)
> {
> int k;
> float r;
> printf("Enter Values \n");
> scanf("%i %e",&k,&r);
> printf("worked %i and %3.3e \n",k,r);
> return(0);
> }
>
> Wilmer
>
well i think you're facing this problem while *DEBUGGING* the program .
If so then go to Run->Open Debug Dialog->Debugger
select "gdb/mi" as your default debugger and "standard" as your command
set and not "standard(windows)" as your command set .
This should solve the problem
|
|
|
Powered by
FUDForum. Page generated in 0.09038 seconds