CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: instances

  1. #1
    Join Date
    Jul 2010
    Posts
    94

    instances

    How many instances are created after called in a template function/class ?

  2. #2
    Join Date
    Feb 2002
    Posts
    4,640

    Re: instances

    What?

  3. #3
    Join Date
    Jul 2010
    Posts
    94

    Re: instances

    template <class C>
    void func(C a)
    {
    // do something
    }


    and in call main
    {
    func<int>(6);
    func<double>(10.5);
    }

  4. #4
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: instances

    You're going to have to clarify the question.

  5. #5
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,637

    Re: instances

    Your question isn't clear, but it seems the debugger and a breakpoint in your class constructor should answer it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured