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.
当我尝试使用文件路径打开文件时出现错误
out_stream5.open("C:pathshowitems.txt", ios::out);
警告 C4129:“o”:无法识别的字符转义序列错误 C2100:非法间接
我想你在 Windows 上工作。问题可能是您需要转义反斜杠:
out_stream5.open("C:\\path\\showitems.txt", ios::out);