Expand|Select|Wrap|Line Numbers
- #include <fstream>
- #include "BinaryTree.h"
- using namespace std;
- Node* BinaryTree::MakeTree(ifstream& infile)
- {
- char name;
- infile>>name;
- Node* base = new Node(name);
- return base;
- }
error C2143: syntax error : missing ';' before '*' //this error occurs on line 5
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2556: 'int *BinaryTree::MakeTree(std::ifstream &)' : overloaded function differs only by return type from 'BinaryTree::Node *BinaryTree::MakeTree(std::ifstream &)
error C2371: 'BinaryTree::MakeTree' : redefinition; different basic types
error C2264: 'BinaryTree::MakeTree' : error in function definition or declaration; function not called
I assumed that the first error probably meant there was a missing semicolon somewhere in my BinaryTree.h file, but i have checked over it thoroughly and can't find see any place that it is missing. It doesn't make sense to me either that it wants a semicolon after "Node". It is just really weird!
I can provide my BinaryTree.h file if anyone wants to look at it.