• (3 Pages)
  • +
  • 1
  • 2
  • 3

Object Oriented Programming (oop) Tutorial Explains the basics of OOP. [Part-I] Rate Topic: ****- 4 Votes

#1 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 180
  • View blog
  • Posts: 4,667
  • Joined: 26-November 04

Posted 21 December 2004 - 03:02 AM

This Tutorial teaches you Object Oriented Programming from scratch. It is supposed to teach Inheritance as well but it is incomplete as of now. But the tutorial teaches you so many other things before you need to know Inheritance that by the time you finish reading it, the other half will be complete.

-Sanchit
Is This A Good Question/Topic? 2
  • +

Replies To: Object Oriented Programming (oop) Tutorial

#2 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 180
  • View blog
  • Posts: 4,667
  • Joined: 26-November 04

Posted 13 January 2005 - 09:54 AM

I decided to make this Tutorial Complete in itself. Hence I shall name it OOP Tutorial in C++ PART 1.
PART 2 will contain Inheritance and a few advanced concepts of OOP.
Here's the PART-1 Version of the Tutorial.

Attached File(s)

  • Attached File  oop.txt (38.85K)
    Number of downloads: 12304

Was This Post Helpful? 4
  • +
  • -

#3 Vextor  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 8
  • View blog
  • Posts: 313
  • Joined: 22-May 02

Posted 13 November 2005 - 03:32 AM

I know it's been some time since you posted this tutorial but I wanted to put my two cents in. This is really great and keep up the good work. It's given me everything I need to get myself back on track with where I had left off in C++ a while back. With this and a few other tutorials i've alaready learned a ton. Thanks!
Was This Post Helpful? 0
  • +
  • -

#4 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 180
  • View blog
  • Posts: 4,667
  • Joined: 26-November 04

Posted 17 January 2006 - 07:04 AM

I know it's been a long time since you posted before me [i just had to put in the pun ;) ]
Sorry for late reply...looks like I should keep an eye on the Tutorials Section too.
Thanks for your appreciation...I makes me write more and more.
Currently I'm writing a tutorial on Recursion...It's going to be real exhaustive and informative.
I hope I'll be able to finish that soon because as I'm writing it, I feel its the best one so far.

Thanks.
Was This Post Helpful? 0
  • +
  • -

#5 Jessehk  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 24
  • Joined: 06-January 06

Posted 17 January 2006 - 03:10 PM

I was under the impression that class methods should not be declared inline unless it was a template class.

Though I could be wrong...

Other than that, great tutorial. :)
Was This Post Helpful? 0
  • +
  • -

#6 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 180
  • View blog
  • Posts: 4,667
  • Joined: 26-November 04

Posted 16 March 2006 - 12:48 AM

Jessehk, on 18 Jan, 2006 - 02:32 AM, said:

I was under the impression that class methods should not be declared inline unless it was a template class.

Though I could be wrong...

Other than that, great tutorial. :)

no...just a matter of convention and choice...some people stick to that convention...
Was This Post Helpful? 0
  • +
  • -

#7 shikha  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 30
  • Joined: 23-May 06

Posted 25 May 2006 - 02:56 AM

while using float values ...... we write 0.2f,6f........etc;
wat does ut signify?????
Was This Post Helpful? 0
  • +
  • -

#8 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 180
  • View blog
  • Posts: 4,667
  • Joined: 26-November 04

Posted 25 May 2006 - 10:08 PM

the 'f' suffix is just a printf Conversion-type character.
Any number that's suffixed with an 'f' just shows that its expected type is a floating point.

Here are the other Conversion-type characters.

Quote

Type Char Expected Input Format of output

d Integer signed decimal integer
i Integer signed decimal integer
o Integer unsigned octal integer
u Integer unsigned decimal integer
x Integer unsigned hexadecimal int (with a, b, c, d, e, f)
X Integer unsigned hexadecimal int (with A, B, C, D, E, F)
f Floating point signed value of the form [-]dddd.dddd.

e Floating point signed value of the form [-]d.dddd or e
[+/-]ddd
g Floating point signed value in either e or f form, based on given value and precision. Trailing zeros and the decimal point are printed if necessary.
E Floating point Same as e; with E for exponent.
G Floating point Same as g; with E for exponent if e format used

Characters
c Character Single character
s String pointer Prints characters until a null-terminator is pressed or precision is reached
% None Prints the % character

Pointers
n Pointer to int Stores (in the location pointed to by the input argument) a count of the chars written so far.
p Pointer Prints the input argument as a pointer; format depends on which memory model was used. It will be either XXXX:YYYY or YYYY (offset only).

Source : Borland Help
Was This Post Helpful? 0
  • +
  • -

#9 shikha  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 30
  • Joined: 23-May 06

Posted 25 May 2006 - 11:14 PM

thankuuuuu................................ :D
Was This Post Helpful? 0
  • +
  • -

#10 ankesh_ec  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 09-September 06

Posted 09 September 2006 - 11:32 PM

View Postborn2c0de, on 21 Dec, 2004 - 03:02 AM, said:

This Tutorial teaches you Object Oriented Programming from scratch. It is supposed to teach Inheritance as well but it is incomplete as of now. But the tutorial teaches you so many other things before you need to know Inheritance that by the time you finish reading it, the other half will be complete.

-Sanchit

this is nice tutorial
Was This Post Helpful? 0
  • +
  • -

#11 completesunny  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 12-September 06

Posted 12 September 2006 - 02:51 PM

View Postborn2c0de, on 21 Dec, 2004 - 03:02 AM, said:

This Tutorial teaches you Object Oriented Programming from scratch. It is supposed to teach Inheritance as well but it is incomplete as of now. But the tutorial teaches you so many other things before you need to know Inheritance that by the time you finish reading it, the other half will be complete.

-Sanchit



where can i get the PART 2 of this .....????can u send as soon as possible
Was This Post Helpful? 0
  • +
  • -

#12 virendra  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 12-September 06

Posted 12 September 2006 - 09:16 PM

where is the second part still waiting for it
virendra :rolleyes:
Was This Post Helpful? 0
  • +
  • -

#13 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 180
  • View blog
  • Posts: 4,667
  • Joined: 26-November 04

Posted 13 September 2006 - 09:49 AM

Thanks for appreciating my tutorial guys.

And more than that, thanks for reminding me that I have to write the second part of this tutorial. I'm really sorry I totally forgot that I had this pending.


I'll start working on it.

And just in case if somone is already familiar with Inheritance in C++, be sure to check out my Polymorphism Tutorial in the C++ Tutorials Section.

I've even included how the compiler implements polymorphism internally.

Will be back soon with Part-2.

Sorry to keep you guys waiting.

And once again, thanks for reminding me about the second part.
Was This Post Helpful? 0
  • +
  • -

#14 janotte  Icon User is offline

  • code > sword
  • member icon

Reputation: 990
  • View blog
  • Posts: 5,141
  • Joined: 28-September 06

Post icon  Posted 28 September 2006 - 07:10 AM

Very cool tutorial, thank you.

I am a little confused by the "void main()".

Shouldn't it be "int main()" for C++?

Not a big issue but good to get people off on the right foot. But not to take away from your great work in putting this together. Thank you again.

Reference
The C++ Standard requires that main() returns type int. A program which uses any other return type for main() is technically not Standard C++, although many compilers do not enforce this strictly.
http://en.wikipedia....Minimal_program
Was This Post Helpful? 1
  • +
  • -

#15 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 180
  • View blog
  • Posts: 4,667
  • Joined: 26-November 04

Posted 28 September 2006 - 09:16 AM

Yes, I completely agree with you.
Unfortunately at the time of writing this tutorial, I did not realize this. And by the time I did, I was too lazy to change all voids to ints.

Glad to hear that you enjoyed the tutorial.
:)
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3