jeudi 16 avril 2015

Why do I get "end of file found before the left brace '{' in hashtable.h(8)"?

It gives that error when i try to compile and I don't know why because both set of braces are matched.



#include <iostream>
#include <vector>
#include <list>
#include <string>
#include <utility>
#include <fstream>

namespace cop4530 {

template <typename T>
class HashTable {
public:
HashTable(size_t size = 101);
~HashTable();
bool contains(const T &);
bool insert(const T &);
bool insert(T && );
bool remove(const T& );
void clear();
bool load(const char *);
void dump();
bool write_to_file(const char *);

// used when improper size is given (for example
// size is 0 or negative)
static const unsigned int default_capacity = 11;
static const unsigned int max_prime = 1301081;

private:
std::vector<std::list<T>> listTab;
void makeEmpty();
void rehash();
size_t myhash(const T &);
unsigned long prime_below(unsigned long);
void setPrimes(std::vector<unsigned long> &);
int currentSize;
}; // end of HashTable

#include "hashtable.hpp"

}; // end of namespace 4530


Or is the problem possibly in the .hpp or even the main.cpp?


Thanks!


Aucun commentaire:

Enregistrer un commentaire