Hi to everyone I'm a total newbie but willing to learn, I'm taking Video Game Programming starting January but I want to get ahead since my C++ classes are until next semester so I want to learn some on my own I finished some exercises but this last one can't figure it out
C:\Users\owner\cpp programmin\exercise 1.6.6 bug fixing.cpp||In function `int mian()':|Code://Programmer: Fernando B
//Program: debug
//Purpose: debugging
#include <iostream>
#include <string>
using namespace std;
int mian ()
{
string str = "Hello World!";
cout << str << endl;
cout << float x = 5.0f * str << endl;
int 65Num = 65;
cout << "65Num = " << 65Num << endl;
}
C:\Users\owner\cpp programmin\exercise 1.6.6 bug fixing.cpp|16|error: expected primary-expression before "float"|
C:\Users\owner\cpp programmin\exercise 1.6.6 bug fixing.cpp|16|error: expected `;' before "float"|
C:\Users\owner\cpp programmin\exercise 1.6.6 bug fixing.cpp|18|invalid suffix "Num" on integer constant|
C:\Users\owner\cpp programmin\exercise 1.6.6 bug fixing.cpp|18|error: expected unqualified-id before numeric constant|
C:\Users\owner\cpp programmin\exercise 1.6.6 bug fixing.cpp|20|invalid suffix "Num" on integer constant|
||=== Build finished: 5 errors, 0 warnings ===|
I spotted a few typos and the mian instead of main, I think the float variable needs to be declared prior to using in cout not quite since the instructions just say run it and try to fix based on the errors. Thanks a lot oh I almost forgot using code::blocks if it matters.