Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 15. Templates and Generics > Templates in C++/CLI

15.9. Templates in C++/CLI

In C++/CLI you can create and use a managed class template or function template just as you would with native C++. For example, the Stack class in Fig. 15.2 can be declared in managed code as follows:

template< typename T >
ref class ManagedStack
{
    // body of class definition
};


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint