Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > returning pointer of template type function header

Thread Tools

returning pointer of template type function header

wiegmale wiegmale is offline
Junior Member
Join Date: Jul 2010
Posts: 2
We are creating a array list class and making it a template.

template <class ItemType>
class ArrayList

typedef ItemType* pItemType;
typedef pItemType* ppItemType;
My function is returning an item of type pItemType. My syntax is wrong, but I'm not sure what it should be:

template <class ItemType>
ArrayList<ItemType>::pItemType ArrayList<ItemType>::Add(pItemType anItem)
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Function pointer as template argument - does not work for function template avasilev C++ 4 12-22-2011 02:11 PM
returning pointer to template objects in nested template classes Javier Montoya C++ 4 11-20-2010 11:19 PM
function returning function pointer (recursive type) Mark Piffer C Programming 9 05-15-2009 07:54 AM
problem with a function template returning a private nested class ofa class template C++ 2 12-28-2008 10:43 AM
Passing pointer to template function as argument to pointer to template function Vijai Kalyan C++ 4 11-08-2005 07:53 PM