Question: So could you? As an example, you can print a line out onto the screen using `std::cout << "Message";` but if you add `using namespace std;` to the top of your code you can then use it without the `std::` and just use it as `cout << "Message";`

Can you do that with your own code?

Edit: Let me explain better.

Let's say I have class A:

```
//Class A
#include <iostream>
#include "A.h"
using namespace std;
class A {
public: void testFunction() {
cout << "My message";
}
};

```

Then, providing I have headers setup correctly, I would be able to do:

```
//Class B
#include <iostream>
#include "A.h"
using namespace std;

class B {
int main() {
A aObject; //Create the object
aObject.testFunction(); //This is how I'd have to reference it
return 0;
}
};

```

So what I'm wondering, is whether, even though it's in a seperate class, how to reference that function using just `testFunction()` rather than `aObject.testFunction()`

Answer: 
Non-static member functions of a class can only be called on an object of that class. That's what they are for. You don't have to have a named object but you still have to have an object:

```
A().testFunction();

```

If you make the function `static` then you can call it like this:

```
A::testFunction();

```

It doesn't make any sense to talk about calling that function in any other way. This is how member functions work. It sounds like you really want a non-member function, perhaps in a namespace.
If u want to call a method(say in class A) only by its name then it will create ambiguities when there is a method with same name,parameters,return type in another class(say class B) that is also included in the header.