C++ HELP Class Error!!!

//Look below and there is an error please help



#include <iostream>
#include <string>
#include <vector>
#include <ctime>
#include <cstdlib>
using namespace std;



class Walk
{
public:
string m_Terrain;
int m_Select;
void Left(int);
Walk();
};

Walk::Walk()
{
}

void Walk::Left(int select)
{
m_Select = select;
if (m_Select <= 3)
{
m_Terrain = "----------me----goblin--------------------------------------\n\n";
cout << m_Terrain;
}
else
{
m_Terrain = "----------me------------------------------------------------\n\n";
cout << m_Terrain;
}
}

int main()
{
srand(static_cast<unsigned int>(time(0)));
int a = rand();
int b = (a % 6) + 1;
Walk walkL();
//It says Walk walkL()
//Error: expression must have a class type??????????????Waht does that mean???
walkL.Left(b);
return 0;
}
Please use code tags
http://www.cplusplus.com/articles/z13hAqkS/


Walk walkL(); should be Walk walkL;
sorry i didn't know about the tags. I'm new. But anyway thanks for the fix.
Topic archived. No new replies allowed.