0

Hi,

I am still new to C++ and I am having a little trouble compiling the following code, and couldn't figure out what went wrong:

#include <iostream.h>
#include <string.h>

using namespace std;

float x = 5.0f;
int _65Num = 65;

int mian()
{
    string str = "Hello World!";
    cout << str << endl;
    cout << x << "" << str << endl;
    cout << "65Num = " << _65Num << endl;
}

The question ask me to identify the problem which I tried to correct as much as I can but I still get some problem while compiling...

The original code was this:

#include <iostream.h> #include <string.h>

int mian()
{
    string str = "Hello World!"
    cout << str << endl;
    cout << float x = 5.0f * str << end;
    int 65Num = 65;
    cout << "65Num = " < 65Num << endl;
}

Hope someone can point me in the right direction.

4
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by Fbody
0

...Ok.. I spotted the mistake now... Thanks for the hint.
I feel really stupid now... >_<

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.