Is there some way to run C programs interactively through Notepad++'s console where prompts for input would appear? I can't seem to get it work as expected. I can demonstrate with this bit of code-
#include <stdio.h>
int main()
{
int number, i;
printf("Enter a positive integer: ");
scanf("%d",&number);
printf("Factors of %d are: ", number);
for(i=1; i <= number; ++i)
{
if (number%i == 0)
{
printf("%d ",i);
}
}
return 0;
}
When I run this through the NppExec plugin with this script-
NPP_CONSOLE 1
E:\Documents\Notepad++Portable\tcc\tcc.exe -run $(FULL_CURRENT_PATH)
The result is I get no prompt for input. But if I go ahead and enter it anyway, the program proceeds - prints the prompt but also completes the run as seen here.
E:\Documents\Notepad++Portable\tcc\tcc.exe -run E:\Documents\Programs_C\Factors.c Process started >>>
60
Enter a positive integer: Factors of 60 are: 1 2 3 4 5 6 10 12 15 20 30 60 <<< Process finished. (Exit code 0)
================ READY ================
I can get it to work just fine through a cmd window which I can call if I make this small change-
npp_run cmd /k E:\Documents\Notepad++Portable\tcc\tcc.exe -run $(FULL_CURRENT_PATH)
Just curious if it is at all possible to get this to work through the console which would make testing small bits of code much more convenient.