+ 2
hy guyz can u plz tell me the role of #include<string> and the difference between it and #include<iostream>
3 Réponses
+ 4
#include <string> lets you work with strings, save strings as variables and manipulate them.
#include <iostream> lets you receive and send inputs and outputs. Most of our inputs and outputs are texts, so to iostream work properly, it includes string. This way, when you include iostream you also have string, but when you include string you don't have iostream.
+ 1
#include <string> means we are using string library.
#include <iostream> means that we are using iostream library, which is standard library.
The difference between them is scope for using.
+ 1
ty for answers