473,809 Members | 2,699 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Class template and generic class

2 New Member
Hi,
Is there any difference between generic class and class template? May be its the way private members are declared. In generic class private members are also generalised but not in class template. Am i right?
Apr 12 '12 #1
2 2175
weaknessforcats
9,208 Recognized Expert Moderator Expert
Generic classes are part of C# and not C++.

I will move this thread to the C# forum.
Apr 12 '12 #2
RhysW
70 New Member
While i don't usually like suggesting links to other sites as an answer im going against my own rule this once.

MDSN Page

this page explains the differences between the C# generic class and the c++ class template as documented by MS themselves, should answer all your questions!
Apr 12 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1693
by: Petre Iantu | last post by:
How can I partlialy specialize function func below for <class Class, int> for example? Thanks, Petre
2
2414
by: Simon G Best | last post by:
Hello! I have a query regarding explicit specialisation of class templates which are themselves members of class templates. Here's what I want to do: template< class T > struct pink { template< class U > struct floyd;
16
2177
by: christopher diggins | last post by:
It appears that the following is not considered a class: template<typename T> class C { }; ? So officially is this considered: a class, a template, a class template, or a template class? I always thought of it as a parameterized class. What would the rationale be for not considering it as just a 'class'?
0
1208
by: Andrea Cacciarru | last post by:
Why template <class T> class TemplateFriend; //Forward Class "Template" Declaration class A { friend class TemplateFriend; //Any type T! }; compile well with VC++ 7 but do not compile wit gcc or Comeau? What says Standard about friend template class declaration?
1
2274
by: Alfonso Morra | last post by:
if I have a class template declared as ff: (BTW is this a partial specialization? - I think it is) template <typename T1, myenum_1 e1=OK, my_enum_2=NONE> class A { public: A(); virtual ~A() ;
2
3367
by: Rune Vistnes | last post by:
Hey, I am trying to wrap an unmanaged library in managed c++ so that I can use this library in other .NET languages, such as C#. I've been successful for the most part this far, but I'm having a hard time figuring out how to wrap template classes. I'm getting an C3231 compile error when I try to use the generic type as a template type. Here's an example from the MSDN C3231 compile error site:
1
1765
by: Ralfeus | last post by:
Hi all. I have a class, which has some data. I work with list of objects of this class. The data of each object can have different types. For each type of data should has its own Value property to be correct. It looks like this: public class DataElementInt32 : DataElement { public override object Value {
10
1941
by: Egghead | last post by:
Hi all, Can someone kindly enough point me to some situations that we shall or "must" use Generic Class? I can foresee the Generic Method is powerful, but I can not find a single situation that I will need the Generic Class, given there are so many other options. -- cheers,
2
7704
by: Barry | last post by:
The following code compiles with VC8 but fails to compiles with Comeau online, I locate the standard here: An explicit specialization of any of the following:
7
2556
by: (2b|!2b)==? | last post by:
I have a class template. Each of the instantiations implements a method in the class template differently, so I (need?) to use template speciaization. My question is this, when writing the specialization, do I need to implement only the method that is 'different', or do I need to implement all the methods in the class template? template <typename T1, typename T2>
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10640
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7662
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5689
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.