<p>Here is a little test program: </p>

<pre><code>#include &lt;iostream&gt;

class Test
{
public:
    static void DoCrash(){ std::cout&lt;&lt; "TEST IT!"&lt;&lt; std::endl; }
};

int main()
{
    Test k;
    k.DoCrash(); // calling a static method like a member method...

    std::system("pause");

    return 0;
}
</code></pre>

<p>On VS2008 + SP1 (vc9) it compiles fine: the console just display "TEST IT!".</p>

<p>As far as I know, static member methods shouldn't be called on instanced object.</p>

<ol>
<li>Am I wrong? Is this code correct from the standard point of view?</li>
<li>If it's correct, why is that? I can't find why it would be allowed, or maybe it's to help using "static or not" method in templates?</li>
</ol>

static methods can be called also using an object of the class, just like it can be done in Java. Nevertheless, you shouldn't do this. Use the scope operator like
```
Test::DoCrash();
```
Maybe you think of namespaces:
```
```
namespace Test {
    void DoCrash() {
        std::cout << "Crashed!!" << std::endl;
    }
};
```
```
which can only be called by
```
Test::DoCrash();
```
from outside that namespace if the function is not imported explicitly using a
```
using directive/declaration
```
into the scope of the caller.