Public feed
#891736
#include <dirent.h>#include <sys/stat.h>#include <sys/types.h>#include <iostream>#include <sstream>#include <iostream>using namespace std;int main(){ struct dirent **namelist=NULL; struct stat s; int n; n=scandir("/tmp", &namelist, NULL, alphasort); for(int i = 0; i < n; i++) { if(namelist[i]->d_type == DT_REG) { stat(namelist[i]->d_name, &s); cout << namelist[i]->d_name << " " << s.st_size << endl; } } istringstream iss("AUTH_LOGIN test kikou bonjour cemoi meme"); string s2; iss >> s2 >> std::ws; if(iss.good() == true) cout << "---> " << iss.rdbuf() << endl;}