+ 2

hy guyz can u plz tell me the role of #include<string> and the difference between it and #include<iostream>

25th Apr 2016, 12:47 AM
Adinanii Habimanaa
Adinanii Habimanaa - avatar
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.
27th Apr 2016, 2:17 PM
Jorge Guimaraes
Jorge Guimaraes - avatar
+ 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.
3rd May 2016, 8:02 AM
dat
+ 1
ty for answers
22nd Jul 2016, 10:45 AM
hamedskel