Hi guys,
This error is really annoying me but its late and i've been programming all day so I might be missing something stupid.
I keep getting an error saying ui.h:30: error: 'class BTree<Word>' has no member named 'prntInOrder'
here is my ui.h
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#pragma once
#include "btree.h"
#include <fstream>
#include <iostream>
usingnamespace std;
class UI
{
public:
void go (string filename);
void help ();
private:
BTree<Word> tree;
bool load(string filename);
};
> ui.h: In member function 'void UI::go(std::string)':
> ui.h:30: error: 'class BTree<Word>' has no member named 'printInOrder'
> ui.h:30 doesnt exist ...
Do uou have more than one file ui.h?
Are you using an IDE of some kind, and compiling the code from within the IDE?
If so, perhaps the files that you think are being compiled are not the files that are actually compiled.
The line 30 (which doesn't exist) may come from your template class, the compiler generates the class after the template and in this case the generated class is probably placed into your ui.h file (since there is where you use the template, line 15). Have you tested the template separately from ui.h?
Can we also see your node specification?