EDIT: No... I dont wanna use :: I want to be able to use . when using static method EDIT 2: Not a namespace. A class/struct is what I'm trying to use!
I bet this has been asked and answered before but I cant find an answer
Suppose I have a class called "A"
struct A {
void log(const char* x) {
std::cout << x << std::endl;
}
}
If i want to use this class i need to do something like A B;
Then i can do something like B.log("Hello World!");
But is there any possible way I dont have to make an object to use a class? I just want to be able to do A.log("Hello World!");
Is that possible?