char ch[10]; strcpy(ch,"C:\Users\john\Desktop\haha.txt"); ifstream f(ch,ios :: binary | ios :: in,filebuf :: sh_read);
strcpy(ch,"C:\Users\john\Desktop\haha.txt"); ofstream os(ch,ios :: binary | ios :: out,filebuf :: sh_write);
这样的错误怎么办?
error: “sh_read” is not a member of “std::filebuf {aka std::basic_filebuf<char>}”
error: “sh_write” is not a member of “std::filebuf {aka std::basic_filebuf<char>}”
解决方案
10
http://forums.codeguru.com/showthread.php?351866-fstream-sh_write-is-not-a-member-of-std-basic_filebuf-lt-_Elem-_Traits-gt
不过路径就给10字节缓存长度也太抠了吧…
不过路径就给10字节缓存长度也太抠了吧…
5
sh_write 哪里来的东西?
10