using declarations in main (C++)
- by Crystal
Although you wouldn't want to do this, if you have a namespace COMPANY, and a class in that namespace SOMECLASS. Why is it that in the .cpp file, you might define the functions as
COMPANY::SOMECLASS::someFunction()
{}
But in main, you don't do
int main() {
COMPANY::SOMECLASS::someFunction();
}
but instead you declare the namespace and do…