+ 7
Can I use string data type only by including <iostream> library? (without #include <string>)
2 Antworten
+ 8
The answer is yes and no! On most of the compilers yes you can and it will work with iostream. (this includes online, linux and all GCC compilers)
But, Visual studio (Microsoft compiler, I guess cl.exe) can't build that at all. You need to include string library too for sure.
+ 1
This is another problem. Because with the command #include you do not include any library. But only a header file with declarations to use names from library in your code. The including of the library is made else. In IDE options of compilator. Or as parameters in command line compilators Look for it in your tools