Here is a solution to your problem. Please read the in-code comments as they explain the changes that were made to your code.
Code:
//Programmer: Fernando B
//Program: debug
//Purpose: debugging
#include <iostream>
#include <string>
using namespace std;
int main () //Corrected spelling error
{
string str = "Hello World!";
cout << str << endl;
//Deprecated/incorrect code
//cout << float x = 5.0f * str << endl;
float x = 5.0f; //Needed to declare the float before outputting it
cout << x << " " << str << endl; // Unsure how you were trying to output using your previous code but this will output the float followed by a space, followed by a string
//The compiler does not like it when variables begin with numbers; I changed it to work correctly
int Num65 = 65;
cout << "Num65 = " << Num65 << endl;
//For the sake of seeing the output of the application, we will ask it to pause until a key is pressed
system( "pause" );
//We are within a function (int main) that has a return type. This return type is an integer. Therefore, we must obide and return an int:
return 0;
}
Good work, but keep practicing! Don't be afraid to try out different things and see what the compiler says (you mentioned that you thought that the float declaration should have been before the output statement; you should have tested it out! Assignments also need to be written before the output statement, not within!) Remember, the compiler is your friend....mostly