943,821 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 634
  • C++ RSS
Oct 3rd, 2008
0

Please Help

Expand Post »
Hello,
I am little bit confuse for c and c++. All loops are same in both the languages so why they are different for each other?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
PPP1 is offline Offline
6 posts
since Oct 2008
Oct 3rd, 2008
0

Re: Please Help

C++ is the object-oriented version of C.
Reputation Points: 118
Solved Threads: 15
Posting Pro in Training
Denniz is offline Offline
428 posts
since Sep 2008
Oct 3rd, 2008
0

Re: Please Help

C++ is better C , it supports data encapsulation , inheritance , generic programming ,etc .
Reputation Points: 769
Solved Threads: 128
Banned
ithelp is offline Offline
1,910 posts
since May 2006
Oct 3rd, 2008
0

Re: Please Help

Click to Expand / Collapse  Quote originally posted by PPP1 ...
Hello,
I am little bit confuse for c and c++. All loops are same in both the languages so why they are different for each other?
you will find the same similarities in most computer languages and that makes it easy to learn several different languages.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,950 posts
since Aug 2005
Oct 3rd, 2008
0

Re: Please Help

You should rather refer to some good book inorder to remove the elementary confusions.
C++ is an object-oriented version of C.
You can also call it as an enhanced version of C (just in regard to syntax and keywords) .
However, as far as coding style matters, only certain syntactic similarities remain - such as loops. Otherwise, C++ possesses a whole new concept of data encapsulation, inheritance, generic programming, etc., which C certainly doesnt provide.
Reputation Points: 57
Solved Threads: 2
Junior Poster in Training
bhoot_jb is offline Offline
89 posts
since Mar 2008
Oct 3rd, 2008
1

Re: Please Help

>All loops are same in both the languages so why they are different for each other?
Why is Perl different from C++? They both have a for loop with the same syntax.

1) Comparing the syntax of a single feature isn't a good way to compare languages.
2) C++ is designed to have a subset that's interchangeable with C. To a large extent, that design goal has been successful, which is why the loops in both languages are virtually identical in syntax and semantics.

>C++ is the object-oriented version of C.
That's a rather naive perspective. C++ is multi-paradigm, meaning it isn't just object oriented, or generic, or procedural, it's all of them, depending on your tastes and needs.
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004
Oct 3rd, 2008
0

Re: Please Help

> C++ is a OO oriented version of C.
>> That's a rather naive perspective. C++ is multi-paradigm, meaning it isn't just object oriented, or generic, or procedural, it's all of them, depending on your tastes and needs.

You are right. I just meant to emphasize on the prime and major use of C++, which i think is OO and generic programing.
Reputation Points: 57
Solved Threads: 2
Junior Poster in Training
bhoot_jb is offline Offline
89 posts
since Mar 2008
Oct 3rd, 2008
1

Re: Please Help

>which i think is OO and generic programing.
Bolded for emphasis. Too often people state an opinion and word it as if it were a fact. Sometimes it's intentional, sometimes not, but it's nearly always misleading.
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004
Oct 3rd, 2008
0

Re: Please Help

How would you explain it to some one who knows nothing about computers because i know the difference but I have to hand in a paper that asks us what the difference is and it says you have to make it so simple that a four year old can understand so anyone have any ideas on how to get an A.
Sorry for making a bigger question out of it.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
skatergirl0217 is offline Offline
5 posts
since Oct 2008
Oct 3rd, 2008
1

Re: Please Help

>it says you have to make it so simple that a four year old can understand
That's probably exaggeration, but I would say that C++ is based on C with lots of extra stuff and a few changes.
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Ask about function
Next Thread in C++ Forum Timeline: Please help if you can i am stuck!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC