#include <iostream>
#include "interface.h"
int main()
{
//call member function foo to confirm that it works
interface::Sounds::val.foo();
return 0;
}
#pragma once
#include <iostream>
class A{
public: //public added here
void foo();
};
namespace interface{
namespace Sounds{
//note the inline used here
inline A val{};
};
}
#include "interface.h"
void A::foo(){
std::cout<<1;
}
//nothing needed here as we used inline in the header