Questions tagged [template-classes]
184 questions
-3
votes
2 answers
No matching function for template class operator in C++ with .hpp and .cpp
I have two files that I would like to compile. They are as follows:
Array.hpp
template class Array
{
public:
Array() {};
~Array() {};
int width_, height_;
std::vector data_;
…

hhhhhhhhh
- 113
- 1
- 8
-3
votes
2 answers
How do you resize a dynamic template array?
I have a dynamic template array as a member of my class. However, I can't resize the array in the constructor or in any other functions. I'm confused on the syntax. Here's the code:
template class MaxHeapTree {
private:
…

luigi741
- 5
- 1
-4
votes
1 answer
GAME ENGINE : dynamic_cast - Object class is not a polymorphic type
First of all im trying to create a games engine with similar architecture to Unity. I have an Object class, a GameObject class which inherits from Object. Within GameObject class i am trying to make a template class that will let you add any…

Rigged
- 11
- 1
-4
votes
1 answer
Template function which accepts a template class
I want to write a template function which accepts template class as a input parameter.
template
void Function(T Input)
{
}
Something like above. can the class be Template class??
if yes, how do i write it?
i got an error trying to do…

Barry
- 133
- 1
- 1
- 9