A
Size: a a a
A
I
A
R
Util.cpp: In function ‘std::string getprogname()’:
Util.cpp:7:71: error: no matching function for call to ‘getline(std::ifstream, std::string&)’
std::getline(std::ifstream("/proc/self/stat", std::ios::binary), name)
;
R
R
std::ifstream var{"/proc/self/stat", std::ios::binary}
, то её принимает нормальноAB
Util.cpp: In function ‘std::string getprogname()’:
Util.cpp:7:71: error: no matching function for call to ‘getline(std::ifstream, std::string&)’
std::getline(std::ifstream("/proc/self/stat", std::ios::binary), name)
;
R
R
AB
R
AB
Util.cpp: In function ‘std::string getprogname()’:
Util.cpp:7:71: error: no matching function for call to ‘getline(std::ifstream, std::string&)’
std::getline(std::ifstream("/proc/self/stat", std::ios::binary), name)
;
R
R
R
R
AB
AB
R
#include <iostream>
#include <fstream>
#include <string>
std::string getprogname() {
std::string name;
std::getline(std::ifstream{"/proc/self/stat", std::ios::binary}, name);
return name;
}
R