nice to meet you, Stack overflow residents! Have a question: I'm using Visual Studio 2019 that says me that I've defined some methods multiple times.
I have a header file (for example):
// header.hpp
#ifndef HEADER_HPP
#define HEADER_HPP
#include <iostream>
struct a {
a();
};
#include "degradation.inl"
#endif HEADER_HPP
And the .inl file for definitions (for example):
// degradation.inl
a::a() {
cout << "the hopless one\n";
}
So, the problem is, when I include this with #include <header.hpp>
(that is, I've configured the include paths), have something that looks like that (for example):
error LNK2005: "public: __cdecl a::a(void)" (s0mEsтR@njeSуМb0ls) already defined in helpme.obj
Well, it's not the actual code (you can find the actual code here: GitHub), but I think that this code is a good example.