473,394 Members | 1,802 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Difference between a type and a class?

Hi all,

I have a very basic fundamental wuestion to ask. I am confused about
the difference between type and class? is "int","float","double" a
type? With so many C++ gurus out here, I dont know whether should I
ask this question here or not? But if anyone can help me out, I'll feel
good.

Sep 9 '05 #1
3 1316
am*********@gmail.com wrote:
Hi all,

I have a very basic fundamental wuestion to ask. I am confused about
the difference between type and class? is "int","float","double" a
type?
Yes, these are built-in types, but they are not classes.

A class is also a type, but a type isn't necessarily a class.
With so many C++ gurus out here, I dont know whether should I
ask this question here or not?
It's a completely valid question here.
But if anyone can help me out, I'll
feel good.


Good.

DW
Sep 9 '05 #2
Classes are nothing but structures associated with some methods. The
following article should help:

http://www.eventhelix.com/RealtimeMa...erformance.htm

--
EventStudio 2.5 - http://www.EventHelix.com/EventStudio
Model in Plain Text; Generate Sequence Diagrams in PDF/Word

Sep 9 '05 #3
EventHelix.com wrote:
Classes are nothing but structures associated with some methods.
Nope, classes are just structs with a different default access level.
In truth, structs are classes as far as format C++ terms go. Either
one can have methods, neither is required to have (user-declared)
methods.
The following article should help:

http://www.eventhelix.com/RealtimeMa...erformance.htm

The article seems to have NOTHING to do with the topic.
Sep 9 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: roopa | last post by:
I have declared a class with name List; and in main() function, i have declared the List object as follows class List { public: List() { cout<<"In List Constuctor";
11
by: Shea Martin | last post by:
I have been programming in C++ for over 4 years. I *think* I knew that a struct could have a constructor but I decided to dig into it a little more today, and found that there is very little...
7
by: yufufi | last post by:
lets say we have a 'shape' class which doesn't implement IComparable interface.. compiler doesn't give you error for the lines below.. shape b= new shape(); IComparable h; h=(IComparable)b;...
4
by: ad | last post by:
I am confuse about type and class in some book about C#. What is the difference between type and class?
6
by: JonathanOrlev | last post by:
Hello everyone, I have a newbe question: In Access (2003) VBA, what is the difference between a Module and a Class Module in the VBA development environment? If I remember correctly, new...
12
by: André | last post by:
Hi, i'm learning working with classes. In class "classbase1", i defined an overridable function. In the class "subclass1", i defined the same function with 'Overrides'. In class "classbase2", i...
6
by: fcvcnet | last post by:
Hi, I read the book C++ Primer, Fourth Edition By Stanley B. Lippman, Jos¨¦e Lajoie, Barbara E. Moo "If we define a class using the class keyword, then any members defined before the first...
23
by: Jess | last post by:
Hello, I understand the default-initialization happens if we don't initialize an object explicitly. I think for an object of a class type, the value is determined by the constructor, and for...
6
by: mthread | last post by:
Hi, I am learning C++ and I have been told that an object can be created either by using calloc or new. If it is true, can some one tell me what is the difference b/w using these two function...
21
by: Nikolaus Rath | last post by:
Hello, Can someone explain to me the difference between a type and a class? After reading http://www.cafepy.com/article/python_types_and_objects/ it seems to me that classes and types are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.