Hi,
I've been wanting to code along time and recently just started reading a book about c++ how to start etc...
And i had to make some exercises now, my question is about a certain erxercise:
The following program contains several errors:
*/ Now you should not forget your glasses //
#include <stream>
int main
{
cout << "If this text",
cout >> " appears on your display, ";
cout << " endl;"
cout << 'you can pat yourself on '
<< " the back!" << endl.
return 0;
)
Resolve the errors and run the program to test your changes.
While i did get that outcome the solution was different than what i had altough it was the same. Here is mine and the solution :
MINE:
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
cout << endl << "If this text,"
<< endl << "appears on your display,"
<< endl << "you can pat yourself on"
<< endl << "The back!" << endl;
return 0;
}
SOLUTION:
#include <iostream>
using namespace std;
int main() {
cout << " If this text ";
cout << " appears on your display, ";
cout << endl;
cout << " you can pat yourself on "
<< " the back!" << endl;
return 0;
}
Would love to hear from you guys. Thanks alot if you help me out

I'd like to know if the one i did is wrong, or Not or why i would use the other one.
EDIT: I'm doing all this in visual studio 2018.