Home Download Buy Blog Forum Support

running a C program in the console - not waiting for input?

running a C program in the console - not waiting for input?

Postby vertigoat on Sun Oct 14, 2012 1:07 am

I've written a few small programs in C that require input. Lets say its a program that asks for 2 numbers and then adds them.

When I run this program using [shift-command-B], it never asks me for my input. it just blows through the whole program!

here is what happened when I ran my quadratic equation program I wrote for school:

This program will compute the real roots of a quadratic equation.
You will be asked for (3) constants.
Enter for -a- :
Enter for -b- :
Enter for -c- : Thank you...RESULT: There are no real roots.[Finished in 0.1s]


All I did was hit [shift-command-B] and it just went nuts! why?
vertigoat
 
Posts: 3
Joined: Sat Oct 13, 2012 1:56 am

Re: running a C program in the console - not waiting for input?

Postby C0D312 on Sun Oct 14, 2012 1:58 am

Sublime Text doesn't provide an interactive terminal. While it's on my wish list, I don't know how likely it is we will see it. I'd suggest you build from Sublime but use the terminal for running your program. Perhaps give wbond's terminal plugin a try.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 26 guests