What is the error in this can some explain me I'm new to this | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the error in this can some explain me I'm new to this

#include <iostream> #include <string> using namespace std; int main() { int myNum = 5; float myFloatNum = 5.99; double myDoubleNum = 9.98; char myLetter = 'R'; bool myBoolean = true; string myString = "Hello World !" cout << "int: " << myNum << "\n"; cout << "float: " << myFloatNum << "\n"; cout << "double: " << myDoubleNum << "\n"; cout << "char: " << myLetter << "\n"; cout << "bool: " << myBoolean << "\n"; cout << "string: " << myString << "\n"; return 0; }

10th Aug 2021, 5:46 PM
Mohammad Rehan Glasswala
5 Answers
+ 4
You have missed semicolon in string last 2nd line
10th Aug 2021, 6:23 PM
Aysha
Aysha - avatar
+ 4
Instead of #include <string> You need to use #include<string.h>
10th Aug 2021, 6:16 PM
Aysha
Aysha - avatar
+ 4
Most welcome Rehan Glasswala
10th Aug 2021, 6:27 PM
Aysha
Aysha - avatar
+ 2
Now the output is coming thank you very much 👍
10th Aug 2021, 6:26 PM
Mohammad Rehan Glasswala
+ 1
Then also output is not coming
10th Aug 2021, 6:19 PM
Mohammad Rehan Glasswala