• 0

C, C#, C++, Visual C++


Question

Okay, I guess I want to learn some some of C. I don't have a programming background, except for PHP - which I don't guess will help. I've come to get some books on learning C, but I'm being offered all sorts on C, C#, C++ and Visual C++ - Can anyone tell me which one I want?! What are the differences? I use Windows and Mac, although I would really like to be able to create stuff I could compile on either platform, if possible.

I'm sure this has been asked a million times before, and I should use the search function, but I'm not exactly sure what to search for, and besides, I'm special. :)

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

C++ is the successor to C. it's basically "C with classes", although there is more to it than that really. Visual C++ is a product made by Microsoft. If you want to make windows GUI apps, you can use it - of course there are many other compilers for windows, such as Borland C++ Builder. C# is pretty new; it was developed by Microsoft, and, from what i know, you need Visual C# .NET to code in it. I believe it's only for windows. If you want something that's portable, you should use C or C++ - there are compilers for many platforms. If you want a GUI, you'll need to use a cross-platform toolkit like GTK. If you want to do a lot of the stuff on Mac, like Cocoa, you may need to use objective C (similar to C++). Not as familiar with the Mac stuff though. :)

if you know PHP, it shouldn't be too hard since PHP uses C-like syntax. C++ would probably easiest, since PHP uses classes (right?).

Link to comment
Share on other sites

  • 0

C# is a language created by microsoft, but you don't need Visual C# .net to write code in it, also it isn't just for windows; check out the mono project www.go-mono.com

C++ is an object oriented language that has it's roots in C, but has changed a lot(look at writing code with namespaces for instance) most C syntax works in C++.

C is a procedural language. It is high level enough that you can do something quickly, but it always allows you to go as low level as you want.

Link to comment
Share on other sites

  • 0

C# is like everyone has been saying, a new language created by ms. However there are a few more compilers than just visual C#/C# Express. so long as you have the .NET framework installed you can use any of the ms IDEs or Borlands C# compiler, or even the open source C# compiler SharpDevelop. If windows isn't your thing then there is mono. mono comes w/ its own compiler or you can use MonoDevelop which is the linux equivalent of visual C#

Link to comment
Share on other sites

  • 0

Hehe.

Thanks a lot guys. I have to be able to write programmes for the Mac too, so using Visual C++ is out, right? If I learn C or Objective C then I can compile programmes for use on Mac or PC, right? And can still use GTK for GUIs where I need to?

Once I've been using C for a few months, do you think moving to C++ or C# will be any easier?

Link to comment
Share on other sites

  • 0

I've always considered C++ to be akin to vietnam, a messy thing to get into. C# on the otherhand is a lot like java, which is much much eaiser.

Belive it or not but C# apps will run on a mac, but you'd have to make sure that eother mono or .NET is installed.

Link to comment
Share on other sites

  • 0
C# is like everyone has been saying, a new language created by ms. However there are a few more compilers than just visual C#/C# Express. so long as you have the .NET framework installed you can use any of the ms IDEs or Borlands C# compiler, or even the open source C# compiler SharpDevelop. If windows isn't your thing then there is mono. mono comes w/ its own compiler or you can use MonoDevelop which is the linux equivalent of visual C#

please understand that I am not trying to be rude, but I do want to correct some of the things you have said.

1) Visual C#.NET and Visual C# Express are not compilers, they are IDEs

2) with the .NET Framework and the SDK you can write C# code right after it is installed (you will have to use the command line to use the compiler to comiple your code)

3) SharpDevelop, like Visual Studio.NET and its offspring, are not compilers, they are IDEs (Integrated Development Environments)

4) yes, you can use Mono for .NET development on Linux or a Mac, if you choose. there is another one that microsoft released a while ago called "rotar" (i think i spelled that wrong).

STV

Link to comment
Share on other sites

  • 0
Hehe.

Thanks a lot guys. I have to be able to write programmes for the Mac too, so using Visual C++ is out, right? If I learn C or Objective C then I can compile programmes for use on Mac or PC, right? And can still use GTK for GUIs where I need to?

Once I've been using C for a few months, do you think moving to C++ or C# will be any easier?

Like i said on another thread, if you want to get into the "C Languages", start with C# and work your way down. start with C#, then Java, then C++, and C if you choose. after all of that you will have much more experience and knowledge of each of them (their weaknesses and strengths).

STV

Link to comment
Share on other sites

  • 0
If you want to compile on both pc and mac. Learn C++.

If he wants to compile on both a PC and or a Mac, he can use Java, any C++ compiler, or .NET (Windows and Windows based devices) and Mono (Linux or Mac).

STV

Link to comment
Share on other sites

  • 0

Hmm, I'm wondering the same thing too about the "C" variety of languages. I've worked with Pascal and C++ in school, although I never reached classes in C++ because the teacher sucked. I also programmed web pages in HTML (Yes, I know it isn't a real "language"), PHP and MySQL. So, would you guys suggest C#? Like Garry I'd like to be able to program apps in Windows or on a Mac.

Link to comment
Share on other sites

  • 0
Hehe.

Thanks a lot guys. I have to be able to write programmes for the Mac too, so using Visual C++ is out, right? If I learn C or Objective C then I can compile programmes for use on Mac or PC, right? And can still use GTK for GUIs where I need to?

Once I've been using C for a few months, do you think moving to C++ or C# will be any easier?

You can write apps for Mac and Windows in Objective C. If you want to write GUI apps, you can use wxWidgets. The Cocoa widgets are still in the works, but they look like they're coming along well. http://www.wxwidgets.org/

I think after using C for a bit, moving to C++ will be more beneficial to you in the long run. C# and its underlying framework for platforms other than Windows are not quite complete. Once Mono is "done", you'll probably have a great grasp of OO principles and should be able to pick it up rapidly.

Link to comment
Share on other sites

  • 0

Okay. My take. Sorry for having a diffent point of view: look.

We have:

? C: A more high level langauge, mostly used to write system code. ( think drivers, kernel, ... ) But also used to write Desktop Environements (DEs), i.e. GNOME.

? Obj-C: A way to have Objects in C. This is what OSX uses too. Obj-C has a long tradition at Apple. ( Garbage collector? anyone?)

? C++: Some will find it strange. It has Objects, Generics, .... And IIRC some garbage collector.

? C#: This is an attempt to bring something Like Java, just from MS this time. C# has Objects, Generics, Garbage Collector. And other fancy stuff, runs in a Virtual Machine.

(? Java: This one is from SUN. Has Objects and a Garbage Collector, and since Java 5 (1.5) it has also something like generics )

VM's are a layer that interprets the compiled bytecode from a langauge that runs in a VM ( java, c#, ( any other .NET langauge ) , and some other ).

Those above are ALL procedual langauges. I'm not going into explaining Functual langauges here. ( But they are differen, think: different in their way of working )

A Garbage collector is some kind of system that cleans your memory up for you. You do not need to free the memory you used. You can simply discard your variables when not anymore needed - the GC will free them for you. In C, when you want to do clean coding, you allocate memory and free it.

About the GUI. I, and a few others I know, find wxwidgets syntax somewhat backwards. And thus I stay with GTK or EWL( but EWL is not portable, not yet ).

On Mac I'd stay with Cocoa. If you don't aim for portability. (Than again portability could also get affected by ByteSex issues ).

ANSI C should be pretty portable. As it's a defacto standard. C89/99 is getting harder.

Obj-C is also quite portable ( if not using some tie-in widgesets or stuff. And if you stick close to ANSI C )

C++ portability. Nah I don't know - won't judge!

C#/Java. Should be portable. The Specifications are Open. And Java VM's are there for nearly every OS. C# though is currenlty supported by .NET on windows, dotGNU and mono on Linux, dotGNU (and mono) on OSX. dotGNU comes with Portable.NET wich is intendet to be as portable as possible, hence the name.

Easiers to lern? Hard to answer. If you know how to code. All are equally easy. Especially since they all have some kind of c-syntax.

kindest regards,

Moritz "neofeed" Angermann

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.