Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » CDT » C programs don't run in interactive mode in CDT
icon8.gif  C programs don't run in interactive mode in CDT [message #851731] Sat, 21 April 2012 04:29 Go to previous message
DBTuner Stanley is currently offline DBTuner Stanley
Messages: 1
Registered: April 2012
Junior Member
Hi Guys....I just wrote a simple C program to check if the newly installed CDT works...Though I am able to execute the C program successfully, I find the behaviour different from other IDEs. The below program should print on console first and then take inputs. However, when i run the program in CDT, it takes input first and then prints it....

#include<stdio.h>

int main()
{
char name[80];
char name2[80];
printf("hello\n");

printf("hello second\n");

scanf("%s",name);

printf("You entered %s\n",name);

scanf("%s",name2);

printf("name2=%s\n",name2);

return 0;
}

output console:

peter
parker
hello
hello second
You entered peter
name2=parker

Is there any configuration setting required to correct this behaviour? I would like to make this output behave interactively just like other C compilers/IDEs. Please advise for the same.Thanks.
 
Read Message icon8.gif
Read Message
Read Message icon7.gif
Previous Topic:Incorrect class member indentation influenced by base class specifier
Next Topic:Eclipse CDT errror
Goto Forum:
  


Current Time: Sat May 25 23:03:11 EDT 2013

Powered by FUDForum. Page generated in 0.07260 seconds