help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Shell modes on windowsXP - C programming and scanf issue.


From: flebber
Subject: Shell modes on windowsXP - C programming and scanf issue.
Date: Wed, 28 Mar 2012 19:17:56 -0000
User-agent: G2/1.0

HI

What is the best option to setup a shell in emacs on windows. I am
having trouble with c programming in the shell it is giving precedence
to scanf over printf despite order of commands.

For example this below script expects the result of scanf instead of
printing printf and then waiting for input.

# include <stdio.h>

int a,b,c;
int main()
{
  printf("Please print this out.\n");
       scanf("%i",&a);
       b = 2;
       c = a + b;
       printf(" %i + %i = %i", a,b,c);
         return 0;
}


Shell Interaction.

c:\MyC>trythis.exe
trythis.exe
22
Please print this out.
 22 + 2 = 24

Sayth


reply via email to

[Prev in Thread] Current Thread [Next in Thread]