im new to NPPExec and c coding. Is there a way to compile and run a c code like
int number;
scanf("enter a number: %d" ,&number);
printf("\nyour number is: %d\n", number);
when i try
NPP_SAVE cd $(CURRENT_DIRECTORY) cmd /c g++ -utf-8 -pedantic -Wall -W -Wconversion -Wshadow -Wcast-qual -Wwrite-strings $(FILE_NAME) -o $(NAME_PART).exe& IF ERRORLEVEL 1 (echo. && echo Syntax errors were found during compiling.) ELSE ( cmd /c "$(CURRENT_DIRECTORY)\$(NAME_PART).exe" -run)
the scanf() is ignored
Please help :/
in
It looks as though you are attempting to print out a user prompt in the call to
scanf
. Unfortunately that's not whatscanf
does.You need to print out the prompt separately. Give
or something similar a shot.