0

Class inside a class C++

I was writing a code with two class, one inside of the other, here i linked a small snippet with the part which troubles me the error is the return type of the operator++() function, however i don't know how to solve it i tried to rewrite the code without using the template on the outer class and it works.. can anyone help me? https://code.sololearn.com/cLyQ1EYAaQ1K/?ref=app

2nd Sep 2018, 1:08 PM
Daniele
Daniele - avatar
4 odpowiedzi
+ 2
type in "typename" before the overloaded operator and see if it fixes it
2nd Sep 2018, 7:01 PM
hinanawi
hinanawi - avatar
0
it works hahaha thank you! what does typename do?
2nd Sep 2018, 7:06 PM
Daniele
Daniele - avatar
0
many thanks hinanawi !
2nd Sep 2018, 7:08 PM
Daniele
Daniele - avatar