[SOLVED]Passing extra options to avrdude

Rob
Specific -> easy
Generic-> difficult.
So I try to keep it specific.
Note that you also need to specify the special file somewhere. So the systems has limitations.
I attached the code that reads the first line from a file and uses that as application to call and starting arguments.
Note that if you do not specify a full path in the code you need to be sure in which folder you start the program.
Best regards
Jantje

// capture.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream> 
#include <string.h>
#include <fstream>
using namespace std;



int main(int argc, char* argv[])
{
  string sarg;
  ifstream  myfile;
  char buffer[2048];


  myfile.open ("c:\\input.txt",ios::app);
  myfile.getline (buffer,2048);
   myfile.close();
   string sCommand(buffer);

   for(int i = 1 ; i < argc; i++)
   {
	   sarg.assign(argv[i]);
	   sCommand += " ";
	   sCommand += sarg;
   }
   
   return system(sCommand.c_str());
}