using namespace std;
class Prompt {
public:
string resultadoExecucao(string cmd){
FILE *pipe = nullptr;
char buffer[1024];
pipe = popen(cmd.c_str(), "r");
if(pipe)
{
int i = 0;
char letra;
while((letra = fgetc(pipe)) != EOF)
{
buffer[i] = letra;
i++;
}
buffer[i] = '\0';
return buffer;
}
return "...";
}