|
-
December 11th, 2009, 10:13 PM
#2
Re: When to use pointer template parameters?
 Originally Posted by ZhiYi
I then instantiated the path search using this statement:
Graph_PathSearch<NavGraph*> StartSearch(*m_pGraph,startNode,destNode);
But the compiler produced a long string of compile errors. However, when I changed the template parameter from <NavGraph*> to <NavGraph>, there were no more compile errors.
Maybe the errors were legitimate. It's impossible to know if you don't post your entire code.
Second, if the pointer is typedef'ed, it may resolve some of the errors:
Code:
typedef NavGraph* NavGraphPtr;
And then use NavGraphPtr.
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|