0

i am trying to create a header file in c++ with the following code

#ifndef dictionary_h
#define dictionary_h
#include<utility>
using namespace std;
template <class K,class E>
class dictionary
{
    virtual bool empty() const=0;
    virtual int size() const=0;
    virtual pair<const K,E>* find(const K&) const=0;
    virtual void insert(const pair<const K,E> &)=0;
    virtual void erase(const K&)=0;
};

#endif

but when i hit F9 to compile it says,

[Error] utility: No such file or directory

what is the correct procedure for creating a header file for dev c++ ?

Pradeep
  • 1,193
  • 6
  • 27
  • 44

1 Answers1

1

Dev C++ associates .h files with C headers. Renaming it to .hpp should solve the problem.

Gabe
  • 961
  • 1
  • 10
  • 23