by "Bo Persson" <bop@[EMAIL PROTECTED]
>
Apr 14, 2008 at 12:53 PM
Bharath wrote:
> Dear all,
> I'm trying learn templates concept.
>
> Here is a line of code from Bjarne Strustrup's C++ programming
> language 3rd edition:
>
> template<class C> struct String<C>::Srep
>
> I couldn't understand what the above line of code means. I'm
> expecting "struct/class <name>" after template<class C>. What
> exactly String<C>::Srep mean? Does "String" refer to STL's string
> template?
No, that would be string or std::string - names are case sensitive.
Here String<C>::Srep is the name of a struct, likely declared inside
some example String class. It would be found in a defintion outside of
the class, like
template<class C>
struct String<C>::Srep
{
// contents of Srep goes here
};
Bo Persson
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]