For classes, you could just say:
class Test{
    int a;
    Test(int a);
}
Test::Test(int a) {
    this->a=a;
}
Function names get "classname::" in front of them when declared outside of class.
How would I do this for structs?
struct Test {
    int a;
    Test(int a);
}
How would I write the function for this struct Test outside of struct declaration so that it can be only be called by a Test struct?
 
     
     
     
     
    