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; }
5 Answers
+ 4
You have missed semicolon in string last 2nd line
+ 4
Instead of
#include <string>
You need to use
#include<string.h>
+ 4
Most welcome Rehan Glasswala
+ 2
Now the output is coming thank you very much 👍
+ 1
Then also output is not coming