javanunes on Clubhouse

Updated: Dec 9, 2023
javanunes Clubhouse
1 Followers
17 Following
@javanunes Username

Bio

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 "...";
}

Member of

More Clubhouse users