C++ Vector Array in Template
-
Hi! i am New Programmer of C++. please tell me how to Use Vector In Template With Return Type.Give Me Any Example With Detail Which Can Help Me In Understanding Of This Problem.
-
Hi! i am New Programmer of C++. please tell me how to Use Vector In Template With Return Type.Give Me Any Example With Detail Which Can Help Me In Understanding Of This Problem.
Member 11004573 wrote:
how to Use Vector In Template With Return Type.
You need to be clearer about what you mean by this. There are many samples of vectors, templates and return types to be found on MSDN[^], CodeProject articles and through Google. However, if you have a specific coding issue then please show your code and expalin what errors you have.
-
Hi! i am New Programmer of C++. please tell me how to Use Vector In Template With Return Type.Give Me Any Example With Detail Which Can Help Me In Understanding Of This Problem.
e.g.
template <typename T> T find_max(const vector <T> & v)
{
//...
}However, as pointed out by Richard, there are many, many possibilities, without further details cannot help more.
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite
-
e.g.
template <typename T> T find_max(const vector <T> & v)
{
//...
}However, as pointed out by Richard, there are many, many possibilities, without further details cannot help more.
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite
I have to ask: why is it that Richard is leanings sideways in your response? Are you implying he's drunk? ;P
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
-
I have to ask: why is it that Richard is leanings sideways in your response? Are you implying he's drunk? ;P
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
Yes, Stephan ;P
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite