The contructor must be (by definition) a member of the class. However you can put its
definition outside of the class (declaration must be inside the class one):
class A
{
public:
A(); };
and
#include <iostream>
#include "ctor.h"
A::A(){std::cout << "A()" << std::endl;}
int main()
{
A a;
}