0

My error occurs on line 191 and 156. For some reason it is saying it cant find the default constructor when I have supplied the right amount of parameters.

The error it is giving me is "Cannot find default constructor to initialize base class"

code: http://pastebin.com/WLMvBMyy

If anyone could offer any input it would be greatly appreciated :)

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by blindkilla
0

Please try to delete code until you are left with the shortest program that demonstrates the problem. For this type of error, we don't need the logic of the program, just the structure.

0

I managed to get it solved. I was initializing constructors wrong.

What I did:

VField(int row, int column, int length, const char *s = NULL, bool (*v) (char*) = NULL, void (*h)(void *) = NULL) {
			HField(row, column, length, s, h);
			ptrValid = v;
		}

What the proper way to do it was:

VField(int row, int column, int length, const char *s = NULL, bool (*v) (char*) = NULL, void (*h)(void *) = NULL) : HField(row, column, length, s, h) {
			ptrValid = v;
		}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.