|
Thread: c++
-
Nov 15th, 2001, 08:40 PM
#1
Thread Starter
New Member
-
Nov 15th, 2001, 08:42 PM
#2
New Member
-
Nov 15th, 2001, 10:18 PM
#3
A class is an object that contains items of data as well as operations/functions that can be performed on that data.
boogal1
aaa
Both registered today, both with 1 post each and the reply posted only minutes after the original post. Is this a case of multiple personalities? or simply someone as bored as me with nothing better to do?
-
Nov 15th, 2001, 10:36 PM
#4
PowerPoster
Originally posted by Fishcake
boogal1
aaa
Both registered today, Is this a case of multiple personalities?
LOL, I think you are right. He wanted to increase the post count for both of his users;0
-
Nov 15th, 2001, 11:18 PM
#5
Member
Originally posted by abdul
LOL, I think you are right. He wanted to increase the post count for both of his users;0
Sounds familiar, doesn't it?
-
Nov 16th, 2001, 04:20 AM
#6
transcendental analytic
A class is a type of object, defining its contents and methods related to it, a class is the fundamental part of a paradigm called Object Oriented Programming (OOP) which allows data to be encapsulated and protected from misusage, furthermore object orientation provides inheritance which means grouping classes into a hierarchic structure and polymorphism which means that objects can act in many ways by inheriting special abstract forms. It's very important to learn OOP at an early stage in C++ since you'll be depending on it to produce applications efficiently.
Check out the tutorials at the top of this forum
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 17th, 2001, 07:29 AM
#7
Addicted Member
kedaman,
by using structures in an early stage of learning c++ & OOP, do you easier understand classes later?
Isn't structures quite like classes in some ways?
I don't know........
thanks
-
Nov 17th, 2001, 07:42 AM
#8
PowerPoster
Originally posted by [praetorian]
kedaman,
by using structures in an early stage of learning c++ & OOP, do you easier understand classes later?
Isn't structures quite like classes in some ways?
I don't know........
thanks
Classes and Structures are related to each other but in their basic stages. It means that structure is like a record that can hold different types of information. Other the other hand, a class is a record and also an object that can hold different kinds of information (properties) and it can also have some actions (functions) for its object. So, a class is kinda like an advanced and different structure.
-
Nov 17th, 2001, 07:49 AM
#9
Addicted Member
Ok, then I understand better.
thanks
-
Nov 17th, 2001, 08:17 AM
#10
Monday Morning Lunatic
In C++, a struct is simply a class where all the members are public by default (rather than private as in a class).
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Nov 17th, 2001, 02:49 PM
#11
which already shows just how nearly related they are...
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 17th, 2001, 05:50 PM
#12
Monday Morning Lunatic
Yep, but they're implemented differently, so you need to be careful when crossing languages (C & C++).
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Nov 18th, 2001, 02:22 PM
#13
transcendental analytic
Originally posted by [praetorian]
kedaman,
by using structures in an early stage of learning c++ & OOP, do you easier understand classes later?
Isn't structures quite like classes in some ways?
I don't know........
thanks
No, I think you should go straight on with OOP instead of getting used to functional programming which leaves you with polluted paradigms, a sign that you have missunderstood the use of C++ is that you have global variables and functions around and poorly encapsulated classes, and hardly any abstraction.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|