Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我无法使用 ifstream() 从我的文本文件 (UTF8) 中读取 Unicode 符号,但有些奇怪。你能帮我提供使用方法以及函数中使用哪些参数ifstream吗?
ifstream
您可以为此使用 std 命名空间字符串和 ifstream 。
ifstream in("1.txt"); string s; while(getline(in,s) { for(int i = 0; i<s.length; i++){ cout << s[i] ; } } in.close();