Структура моего проекта:
Код: Выделить всё
project/
├── example.cpp
├── example.hpp
├── main.cpp
└── .vscode/
└── tasks.json
Код: Выделить всё
#pragma once
#include
class Example {
public:
void display(int name);
void other();
};
Код: Выделить всё
#include "example.hpp"
#include
void Example::display(int name)
{
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79868000/vs-code-c-undefined-reference-to-functions-defined-in-another-cpp-file[/url]