2014-11-03 23 views

cevap

6

'u çalıştırmak için https://stackoverflow.com/a/478960/2833126 adresindeki yanıtta ayrıntılı olarak popen ile gittim.

std::string command = "getprop ro.product.model"; 
FILE* file = popen(command.c_str(), "r"); 
if (!file) { 
    // error 
} 
// read the property value from file 
pclose(file); 
gibi bir şey