Try the system() command. For your specific case, try:
-
-
void frmUtama::cryp()
-
{
-
QString p = leSourceFile->text();
-
QString c = leFinalFile->text();
-
-
stringstream foo;
-
string bar;
-
-
foo<<"crypt -e -des "<<p<<" "<<c;
-
getline(foo, bar);
-
-
// interpretted as "crypt -e -des <sourceFile> <finalFile>"
-
system(bar.c_str());
-
}
-
Thanks, but I got stuck with the code when i run "make", this is the error message.
../frmutama.ui.h:42: error: ‘stringstream’ was not declared in this scope
../frmutama.ui.h:42: error: expected `;' before ‘foo’
../frmutama.ui.h:43: error: ‘string’ was not declared in this scope
../frmutama.ui.h:43: error: expected `;' before ‘bar’
../frmutama.ui.h:44: error: ‘foo’ was not declared in this scope
../frmutama.ui.h:45: error: ‘bar’ was not declared in this scope
how to solve that, i really don't know how to do