Re: template class and static variables

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Mohamed Imam (Mohamed.Imam_at_egdsc.microsoft.com)
Date: 03/07/04


Date: Sun, 7 Mar 2004 17:47:23 +0200

Hi,

I think you can define a base class which has a static member. Then let
class A inherits from it. This is your idea and i think it is a good idea.

Thanks,
Mohamed Imam
Microsoft GTSC Developer support for Middle East
http://www.microsoft.com/middleeast/developers/meadsc/

"Nils" <slim@web.de> wrote in message
news:uNfh$8EBEHA.2348@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> I have a template class like
>
> template <class T>
> class A
> {
>
> };
>
> and want a static Attribute, what is the same in every class A, doesn't
> matter, what kind of template T.
> How can I do it best?
> If I derive class A from the static class I want as Attribut, does it
> perform the confition?
>
> Tank you
>
>



Relevant Pages

  • Re: How to write a program to track the value of a certain variable at run-time using debug feat
    ... along with template class this solution can help us to check each ... return (_prm = prm); ... use Parameter as the base class for all parameters. ... some debuggers can show the list of global ...
    (comp.os.linux.development.apps)
  • static members of template classes
    ... however, we are getting very stange errors, because static member ... compiler somehow allocates same place for them. ... be done inside translation unit (that is inside cpp file). ... member of template class into same .h file? ...
    (comp.lang.cpp)
  • Re: static members of template classes
    ... > however, we are getting very stange errors, because static member ... > be done inside translation unit (that is inside cpp file). ... > member of template class into same .h file? ... You're using a compiler that is at least five years old. ...
    (comp.lang.cpp)
  • ASP.NET pages inheriting from template class
    ... I created a template class that inherits from the System.Web.UI.Page ... Parser Error Message: Could not load type ... Public Class PageClassName ...
    (microsoft.public.dotnet.framework.aspnet)
  • ASP.NET pages inheriting from template class
    ... I created a template class that inherits from the System.Web.UI.Page ... Parser Error Message: Could not load type ... Public Class PageClassName ...
    (microsoft.public.dotnet.framework.aspnet)