1

I downloaded notepad++, and MinGW also I installed the nppexec plugin in order to use npp as fully functional IDE.

the command i entered into the nppexec is

npp_save
cd $(FULL_CURRENT_PATH)
gcc -o $(NAME_PART) $(FILE_NAME)
$(CURRENT_DIRECTORY)\$(NAME_PART).exe

now, every time I hit "f6", it lets me to set the command, every single time, how do i stop it? I want to do that if I press F6 the command automatically be executed

second question.

my code, 4 example is:

printf("please enter num\n\n");
int a,b,c;
scanf("%d%d", &a, &b);
c=a+b;
printf(" %d+%d equals %d", a, b, c);

but the output is in wrong order, first it asks for the scanf character and them prints out the FIRST message

1 3
please enter num

 1+3 equals 4

Thank you for the help, Samyon.

samyon196
  • 13
  • 4

1 Answers1

3

You might use the commands npp_save and npp_run:

npp_save
cd "$(CURRENT_DIRECTORY)"
cmd /c del "$(NAME_PART)".o "$(NAME_PART)".exe *.o
gcc -o $(NAME_PART) $(FILE_NAME)
npp_run "$(NAME_PART)".exe

NPP_RUN is the key here.

Jens A. Koch
  • 39,862
  • 13
  • 113
  • 141
  • This thing listens to pipes, and when nothing is entered, just finishes. Flushing some content with `fflush(stdout);` before using `scanf()` might work... – Jens A. Koch Mar 29 '14 at 15:57