Skip to content

Instantly share code, notes, and snippets.

@btc
Created August 30, 2011 17:22
Show Gist options
  • Save btc/1181415 to your computer and use it in GitHub Desktop.
Save btc/1181415 to your computer and use it in GitHub Desktop.
Working code!
vector<string> argArraytest;
argArraytest.push_back("");
argArraytest.push_back("-of");
argArraytest.push_back("GTiff");
argArraytest.push_back("C:\\Users\\Will\\Desktop\\Lena.bmp");
argArraytest.push_back("C:\\Users\\Will\\Desktop\\Lena_IS_NOW_A_GTIFF_BITCH.tif");
vector<char*> argumentPointers( argArraytest.size() );
for ( size_t i = 0; i < argArraytest.size(); i++)
{
argumentPointers[i] = (char*) argArraytest[i].c_str();
}
GDALTranslateTool::PerformTranslate((int)argArraytest.size(), &argumentPointers.front(), NULL);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment