Vikram Vikram - 4 years ago 186
C Question

How to get output in cmd window rather than in console npp for c program

I have MinGW as a compiler and this is the code I currently use to execute my C program

npp_save

g++ "$(FULL_CURRENT_PATH)" -o "$(CURRENT_DIRECTORY)\$(NAME_PART).exe"
cmd /c "$(CURRENT_DIRECTORY)\$(NAME_PART).exe"


but I want the output to be returned out in the cmd window rather than in the console. There are many commands available but they always cause some error. I'm currently using win 8.1 and npp 32-bit with MinGW.

Answer Source

Never mind i found what i was looking for and i wanted that my program's exe file ran and shows me the output so here is the code i you want

cd "$(CURRENT_DIRECTORY)"
g++ "$(FILE_NAME)" -o $(NAME_PART) -march=native -O3
NPP_RUN $(NAME_PART)

just don't forget to put return 0; AFTER getch();

Thanx for editing my answer. Much appreciated

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download