0
Why not show output of this code.someone explain it.Thanks
#include <string> using namespace std; int main() { string a = "I am learning C++"; return 0; }
3 Respuestas
+ 13
Because you never printed the string.
#include <iostream>
#include <string>
using namespace std;
int main() {
string a = "I am learning C++";
cout << a;
return 0;
}
+ 2
because you initialize a string variable but you don't print that... you need to include iostream (#include<iostream>) and print with cout ostream ... inside your main () cout<<a;
0
Thanks for help.
now I understand.
Thanks