class Stringify {
public:
Stringify() : s() { s << std::setprecision(4) << std::dec; };
template<class T>
Stringify& operator<<(T t) { s << t; return *this; }
operator std::string() { return s.str(); }
private:
std::ostringstream s;
};
void foo(std::string s) {
std::cout << s << std::endl;
}
int main()
{
foo(Stringify() << "This is " << 2 << " and " << 3 << " and we can even use manipulators: " << std::setprecision(2) << 3.1234);
}
我希望名称中没有DIR *.*
的目录不符合.
掩码,但会列出它们。为什么呢?
答案 0 :(得分:0)
*.*
表示所有文件,所有扩展名,大概也意味着无扩展名,即文件夹