typename is not allowed

I am just trying to practice my C++ since I got visual studio again and I wanted to make a program where you can just a state of a person aka Humanoid in my case. But I am having trouble with the classes

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>
#include <Windows.h>
#include <string>
class HumanoidState {
	public: 
		const char *State = "Idle";


		std::string GetState() {
			return State;
		}
};

void ChangeState(std::string *state, std::string newState) {
	*state = newState;
}
int main() {
	SetConsoleTitle(TEXT("test"));
	std::cout << "Current state:" << HumanoidState->GetState() << std::endl;
	system("pause");
	return 1;
}
Last edited on
You might want to review on classes.
http://www.cplusplus.com/doc/tutorial/classes/
Thanks. It is working now.
Topic archived. No new replies allowed.