Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reverse C++ lookup

Tags:

c++

templates

I am a "C" programmer that knows just the tiniest bits of C++. I am having a look at some open source C++ code trying to understand some things that it is doing. I can work out most of it but sometimes there is syntax I don't recognise and I'd like to be able to "look up" the meaning of the syntax so I can read just enough to understand that bit of C++. But you can't just type a bunch of symbols into google - or whatever to find out the meaning in C++. Any suggestions of how I can do this in general?

The specific syntax I'm struggling with right now is the following:

void Blah<BOARD>::Generate(SgPoint p)

What is the significance of the <BOARD> in this context? What should I look up in order to understand it?

like image 665
Mick Avatar asked Oct 05 '10 11:10

Mick


1 Answers

void Blah<BOARD>::Generate(SgPoint p)

Generate is a member function of a class template Blah .

BOARD is the name of the parameter.

Your class Blah could be like this :

template <typename BOARD>
class Blah
{
   //...some code
   void Generate(SgPoint p);
   //...some more code
};
like image 160
Prasoon Saurav Avatar answered Sep 20 '22 14:09

Prasoon Saurav