difference between Typename and Class in C++

P

Pallav singh

Hi

Q what is difference between Typename and Class in C++?
Q what is difference between typedef and typename?

Thanks
Pallav Singh
 
A

amrollahi.saeed

Hi

Q what   is   difference   between   Typename and   Class  in   C++?
Q what   is   difference   between   typedef   and   typename?

Thanks
Pallav Singh

Hi Pallav
I assume it isn't a homework.
typename is a keyword which mainly used in programming templates.
class is the
most important fundamental concept in C++. It is used for design and
implementation of user-defined type.
typedef is used for somehow introducing a new name for a type (built-
in and user-defined).
They are vey different in nature and usage.
"typedef" is C/C++ keyword but "class" and "typename" belongs to C++.
I really don't want to be precise.
Use C++ FAQ and The C++ Programming Language by Bjarne Stroustrup for
details
and of course start C++ programming.

Good luck,
-- Saeed Amrollahi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top