Oct 22, 2016 at 12:36am Oct 22, 2016 at 12:36am UTC
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 Oct 22, 2016 at 12:36am Oct 22, 2016 at 12:36am UTC
Oct 22, 2016 at 1:02am Oct 22, 2016 at 1:02am UTC
Thanks. It is working now.