Welcome Guest ( Log In | Register)



2 Pages V  < 1 2  
Reply to this topicStart new topic
> Difference Between C, C++ And C#?, And some other questions.
moodsey211
post Jul 14 2008, 03:57 AM
Post #11


Newbie [Level 3]
***

Group: Members
Posts: 40
Joined: 10-July 08
From: Cebu City Philippines
Member No.: 64,841



QUOTE(coolcat50 @ Jul 14 2008, 11:51 AM) *
C++ is simply a redesign of C. It is called C++ because it added one major thing to C, and that would be object-oriented programming. C# is basically Microsoft's implementation of C++ in the .NET enviroment. At least that is what I have heard.


There is actually C++.NET or most commonly know as C++ 8.0. So I don't think C# is the .NET implementation of C++. biggrin.gif
Go to the top of the page
 
+Quote Post
bittr
post Jul 17 2008, 12:37 AM
Post #12


Member [Level 1]
****

Group: [HOSTED]
Posts: 54
Joined: 16-July 08
From: Brasov
Member No.: 65,085



C and C++ are now clear, I think.

C# language is a procedural, object-oriented syntax based on C++ and includes influences from aspects of several other programming languages (most notably Delphi and Java) with a particular emphasis on simplification.

C# was specially developed as part of the .NET framework. In use with ASP.net, it is the first option.

It is in my opinion the best programming language now existent. And with the greatest future, at least until some other thing gets invented.

So, if you are looking to concentrate on learning somethin, I highly recommend it.
Go to the top of the page
 
+Quote Post
moodsey211
post Jul 17 2008, 04:13 AM
Post #13


Newbie [Level 3]
***

Group: Members
Posts: 40
Joined: 10-July 08
From: Cebu City Philippines
Member No.: 64,841



But C# have it's pros and cons. In my opinion is not that great. I would still prefer C++. C# is for Windows platform only. while you can have C++ on linux or any unix based OS. For me, C# can't replace C++.
Go to the top of the page
 
+Quote Post
iGuest
post Jul 18 2008, 01:43 PM
Post #14


Hail Caesar!
*********************

Group: Members
Posts: 5,876
Joined: 21-September 07
Member No.: 50,369



difference between c++ and vb.
Difference Between C, C++ And C#?

In my recent interview , they asked what is the difference between vb and c++..



-reply by priya
Go to the top of the page
 
+Quote Post
xico
post Jul 29 2008, 03:32 AM
Post #15


Newbie [Level 1]
*

Group: [HOSTED]
Posts: 14
Joined: 29-July 08
Member No.: 65,644



The real difference between with C and other two is that :

* C is structured prgramming language.
* Other languages are Object Oriented programming Languages.

Ok, this is correct, but the main difference between C++ and C# is that C# has more approach with High Level programming by using features like Garbage Collector and special Classes for working easily with WEB, for example. C++ lets the programmer do all the job, but gives you more powerful and speedy.
Go to the top of the page
 
+Quote Post
dimumurray
post Jul 30 2008, 10:16 PM
Post #16


Member [Level 1]
****

Group: [HOSTED]
Posts: 60
Joined: 30-July 08
From: Bronx, NY
Member No.: 65,739



As far as the differences between C and C++ go, most of you have got it right. But the origins and nature of C# tends to be somewhat murky in this discussion.

I'll try to clear that up a bit.

Before microsoft created C# they created J, which was their answer to Java (created by Sun Microsystems). Sufficed to say, that language just did not take off as a platform and fell flat on its face. It is rumored that Microsoft was so ashamed of its creation that at one point they denied its existence. In any case with the advent of the .Net platform they took another stab and created C#.

The syntax of C# is very close to Java, more so than it is to C++. Like Java it has interfaces and a single-inheritance hierarchy.
What does that mean? Let's start with the whole single-inheritance hierarchy thing. C++ allows for multiple inheritance, that means a class can have more than one super class. There are inherant problems with multiple inheritance, however. Let me give you the classic Diamond Of Death scenario. You're given four classes. Classes B and C are subclasses of Class A, and Class D --using multiple inheritance-- is a subclass of both B and C. Class A sits at the top of the heirarchy, B and C sit on a level below and D is on the 3rd and last level(if you play connect the dots following the classes in the following order A-B-D-C-A you get a diamond).
Let say both classes B and C override the method 'foo()' of their super class A, but class D inherits from B and C without overriding any methods. How does D resolve calls to its inherited method 'foo()'. It can't. Hence the fabled 'Diamond of Death' (queue menacing sound).
The Java designers decided to implement a single-inheritance scheme to remedy this issue. That meant that a class can inherit-from/extend/subclass one and only one super class. To compensate for the loss of functionality that multiple inheritance provided, Java introduced interfaces. Think of them as classes whose methods have no body, that is, they have no implementation.

Interfaces look something like this:
CODE
interface Movable{
    public void up();
    public void down();
    public void left();
    public void right();
}



Now, in addition to their extends keyword Java and C# also have the implements keyword for interfaces. When the implements keyword is followed by the name of an interface, a class is required to implement all the interface's methods as seen below:
CODE
class Car extends Vehicle implements Movable{
    // ...other code


   public void up() {
       // implementation goes here
   }

   public void down() {
       // implementation goes here
   }

   public void left() {
       // implementation goes here
   }

   public void right() {
       // implementation goes here
   }
}


A class can implement as many interfaces as it likes and since every class that implements an interface has to provide its own implementation of that interface's methods the DOD (Diamond of Death) scenario never arises.
Java also supports garbage collection(i.e. freeing memory occupied by unused objects) and in the true spirit of mimicry so does C#.

And that, as far as I know, is the difference between C# and C/C++. As for C# and Java, this is what one of my former professors told me "Java uses 'String', C# uses 'string'". Nuff' said smile.gif.

This post has been edited by dimumurray: Aug 5 2008, 02:38 PM
Go to the top of the page
 
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. The Difference In Variables?(3)


 



- Lo-Fi Version Time is now: 12th October 2008 - 03:51 PM