Множественное определение в заголовочном файле ⇐ C++

Программы на C++. Форум разработчиков
Anonymous
Множественное определение в заголовочном файле

Сообщение Anonymous »

Пример кода:

complex.h:

Код: Выделить всё

#ifndef COMPLEX_H
#define COMPLEX_H

#include 

class Complex
{
public:
Complex(float Real, float Imaginary);

float real() const { return m_Real; };

private:
friend std::ostream& operator

Подробнее здесь: [url]https://stackoverflow.com/questions/2727582/multiple-definition-in-header-file[/url]

Вернуться в «C++»