Calling template function within template class?

The template keyword is required here, as obj is an instance of a type Foo.

Obj. Bar(1,2); // This line is faulty. The template keyword is required here, as obj is an instance of a type Foo which depends on the template parameter T, and so the above should be written as: obj.

Template bar(1,2); //This line is corrected :-) Read @Johannes's answer here for detail explanation: Where and why do I have to put "template" and "typename" on dependent names?

Could this be a case of foo. Template bar‹ double >?

As so often: Once the question was posted, the answer came all by itself. Correcting the faulty line to return obj. Template bar(1,2); yields the expected results.

Thanks for reading...

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions