Qt QProcess
作为几乎对C++进行语言级别改变的框架Qt,进行了与Cocoa类似的封装,对了,其实感觉Qt对C++从语言特性的改变 上来说类似于Cocoa对于Objective C的改变,不同的是Qt没能统治C++世界。
Test1:
#include <QtCore/QCoreApplication>
#include <QtCore/QProcess>
#include <QtCore/QStringList>
int main(int argc, char *argv[])
{
QString program = "cat";
QStringList arguments;
arguments <<"a" <<"b";
QProcess *myProcess = new QProcess();
myProcess->start(program, arguments);
myProcess->waitForFinished();
QByteArray output = myProcess->readAllStandardOutput();
printf("%s", (