D
D
Daniel2018-10-14 15:18:53
C++ / C#
Daniel, 2018-10-14 15:18:53

How to create a .h class implementation file?

There is a file Sortable.h

#pragma once

template<typename T>
class Sortable
{
public:
  virtual int compare(T *t) = 0;
  Sortable();
  ~Sortable();
};

How and in general why write a .cpp implementation file to it ???
Compiler always writes (create or not) to use class template requires argument list template
member function not defined in Sortable

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question