Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Running C/C++ program
Running C/C++ program [message #231827] Sun, 09 September 2007 09:56 Go to next message
Eclipse UserFriend
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 messageGo to next message
Eclipse UserFriend
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 messageGo to next message
Eclipse UserFriend
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 messageGo to next message
Eclipse UserFriend
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
Eclipse UserFriend
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
Previous Topic:Eclipse invoking Emacs
Next Topic:Eclipse TPTP Error
Goto Forum:
  


Current Time: Tue Jul 16 14:37:46 GMT 2024

Powered by FUDForum. Page generated in 0.10820 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top