user2821178
user2821178

Reputation: 43

Avoid close command line window at end

on Visual C++ 2010 cli, I can execute without problems as follow:

comando = "-F -v -pm328p -cstk500v1 -P " + comboBox1->SelectedItem->ToString() +" -D -Uflash:w:C:\\ll.hex:i";
Process::Start( "avrdude.exe", comando );

but at the end of executing, the window closes automaticaly.

How can I avoid the automatic closing? I wish not to use batch file...

Thanks!!

Upvotes: 0

Views: 97

Answers (2)

user2821178
user2821178

Reputation: 43

I solved creating a batch file as follow:

avrdude %*
pause

and changing

and changing my code in this way:

Process::Start( "avrdude.bat", comando );

Upvotes: 1

ReZa
ReZa

Reputation: 347

You can do that by adding a getchar() or cin in the last line of your program before return So the program waits for an input and won't close automatically

Upvotes: 0

Related Questions