Fix The Program
Try compiling this program. Make note of the errors and come with a solution to fix it.
int main()
{
std::cout << "Hello world!";
}
Hint
std::cout is borrowed from a file that isn't included.
answer
#include <iostream>
int main()
{
std::cout << "Hello world!";
}
Our program wasn't compiling because we were trying to a piece of code from another file that isn't included. In this case
std::coutwasn't recognized because it is from the fileiostream, which wasn't included.