Cannot use ifstream in Xcode

前端 未结 1 904
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-23 15:28

I am new to C++ and have researched this everywhere and cannot seem to figure out how to compile this and have not idea why. It works in visual C++ but not Xcode. The error seem

相关标签:
1条回答
  • 2021-01-23 16:25

    You forgot to #include <fstream>, the header file that actually defines all your ifstream goodness. You included <iostream> twice (or at least tried to), perhaps one of those was meant to be <fstream>?

    0 讨论(0)
提交回复
热议问题