I've been searching across the web but seen to not find the keyword. let's say I want to use the class type to create a method/function. Here is an easy example:
struct action{
//constructor
action(int n){
}
};
action move(){
}
here, I'm using the action
class as the type of the function. Here are my questions: What is this called? How do I use the constructor of the class? what should I return in the function move? (it doesn't let me return this
. error:[invalid use of 'this' outside of a non-static member function]
)