Jump to content


Photo

Is it worth it to learn C/C++


  • Please log in to reply
11 replies to this topic

#1 zingyGecko

zingyGecko

    Young Padawan

  • Members
  • Pip
  • 16 posts

Posted 04 September 2006 - 01:35 AM

Is it worth it to learn C/C++? I enjoy making programs and stuff in VB6, and I've been wondering lately if I should switch over. I know the basics of C; like I can make a command-line app with if/then statements and while/for loops, etc. But from what I've seen, just to make a simple window with some text takes a ton of code. In VB you basically... click and you have a form. I also like how in VB6, when typing a function, like MsgBox, it'll remind you what arguments it takes. Are there IDE's for C that work like this?
Another thing is: I see people asking VB questions all the time, like "How do you do an API call" and stuff, but never a question like that for C++. Once you have it down is it easy to figure out that stuff? And how the hell do people memorize all this stuff! Like making a winsock, or a window with a label! It doesn't seem humanely possible, with all those lines of code.

So I guess to sum it up: What I want to know is: Is there any reason to use C or C++ over VB6 or another high-level language? And if so, is OOP really needed, or is it safe to just stick with C rather than C++. And lastly, how do they do it (memorization, or help from IDE, etc.)!?

edit: oh yeah, and could someone explain to me how pointers are useful, and maybe show a VB6 example where a pointer could make things easier (even though I'm sure vb6 has no pointers).

Edited by zingyGecko, 04 September 2006 - 01:38 AM.


#2 Net-Margin

Net-Margin

    Young Padawan

  • Members
  • Pip
  • 55 posts
  • Location:United Kingdom
  • Interests:My main interests would have to be general computing and digital imaging; but I also enjoy Website Design and animation.<br /><br />Away from the computer I enjoy watching Science programs and astronomy.<br /><br />My main skills would have to be XHTML and Web Marketing but I also have good knowledge in CSS, Search Engine Optimization and Javascript.<br /><br />I own the Macromedia Studio 8 which I believe is one of the best packages ever. I also use Visual Basic 2005 Express Edition.

Posted 07 September 2006 - 10:25 AM

I won't pretend to have any knowledge on the C language as I have am literally still working on learning the basics in C++ but I have a fair bit of Visual Basic .NET 2005 experience.

C++ is basically a more complex and 'better' language which is supposedly a faster compiler and more of the bigger programs you see for windows are coded in C++ like mIRC and I think Mozilla Firefox is based something around C++, but don't hold me to that.

The IDE that are commonly used are DevC++ and Visual C++, I don't know if they are cross-OS compatible as I use Windows & Linux and program on Linux as I use Microsoft Visual C++.

I think in C++ people use the WinAPI or something but I cannot and will not go into detail on that as it's difficult for me as I have no grasp on any experience in the language, while Visual Basic use API's for MSN to create their own Bots or Clients.

I'm not sure about Databases in C++ like SQL Server 2005 in Visual Basic 2005 but you may be able to use that.

If you use the Microsoft version of C++ there are beginner video tutorials for free from LearnVisualStudio.net and they're brilliant, they will lead you through the basic properties and OOP, it will tell you about Database structuring in C++ and how to use it for general things.

I would personally learn it as it's a good saught after language. Good luck.

#3 Net-Margin

Net-Margin

    Young Padawan

  • Members
  • Pip
  • 55 posts
  • Location:United Kingdom
  • Interests:My main interests would have to be general computing and digital imaging; but I also enjoy Website Design and animation.<br /><br />Away from the computer I enjoy watching Science programs and astronomy.<br /><br />My main skills would have to be XHTML and Web Marketing but I also have good knowledge in CSS, Search Engine Optimization and Javascript.<br /><br />I own the Macromedia Studio 8 which I believe is one of the best packages ever. I also use Visual Basic 2005 Express Edition.

Posted 11 October 2006 - 04:34 PM

I personally feel that C is a better language to start with, mainly because it's more basic, and will force you to create cleaner programs. OOPs take a long time to run through, especially in math programs, so starting with those can create bad programming habits.


I haven't learnt C but many people believe that for an easier programming option then you should learn PASCAL, I have never used it. Never even created the Hello World script with it but it's supposed to be easy.

C++ is a powerful language and I think it's brilliant, but I can't get the grasp of it with being a continuous Visual Basic .NET 2005 programmer.

#4 Wybe

Wybe

    Jedi In Training

  • Members
  • PipPip
  • 401 posts
  • Gender:Male
  • Location:the Netherlands
  • Interests:I have no interests

Posted 24 October 2006 - 03:26 PM

No, it isn't.

#5 joe

joe

    Young Padawan

  • Members
  • Pip
  • 115 posts
  • Location:stuck in the middle of cyber space

Posted 22 December 2006 - 06:09 AM

I learn C++ now and i'm so glad to learn it.....
Coz, benefit to learn C++ is cross platform.... and VB only can run under Windows... :) :(

about pointer, you can find it in : www.cprogramming.com

Cheerrsss....

#6 Boom_

Boom_

    Young Padawan

  • Members
  • Pip
  • 4 posts

Posted 22 December 2006 - 07:06 AM

C++ is industry standard, should you want a career in programming, you'll more then likely need to know some C, c sharp or plus plus unless your into web development.

I personally think its an outstanding language and with myself using basic for such a long time, I now see the power I been missing out on. The benefits outweigh the difficulty.

Also I use Dev-C++ but on the subject of GUI's, doesnt microsoft's C sharp give you the option to making easy interfaces.

Edited by Boom_, 22 December 2006 - 07:08 AM.


#7 Scabies

Scabies

    Young Padawan

  • Members
  • Pip
  • 2 posts

Posted 31 March 2007 - 02:14 AM

i like c++ better i think delphi is easy to work with and well set up not too big of a fan of vb

#8 Jynxis

Jynxis

    Young Padawan

  • Members
  • Pip
  • 132 posts
  • Location:The Shadows

Posted 17 May 2007 - 01:29 AM

Im learning C++ right now, and to be honest, although its a real pain, its quite fun to learn.

#9 MetalSkin

MetalSkin

    Young Padawan

  • Members
  • Pip
  • 196 posts
  • Gender:Male
  • Location:Brisbane, Australia

Posted 25 June 2007 - 05:17 AM

The biggest problem with C++ is that it allows you to do sloppy coding ala C style. There is no memory management (which causes the dreaded memory leak that you may see mentioned) and the ability to have buffer overflows is a never ending problem.

Why do you wish to learn another language? What are your goals? What platforms do you wish to program on and do you wish to write games, write business software, program portable devices, contribute to open source projects, do some neat stuff on windows or on a linux GUI front end, etc... the list is endless but where you wish to go will have a big impact on what to learn.

Btw, C is useful but only if your writing very low level stuff. Admittedly the standard SDK for Gnome is in C while the competition is C++. But for Windows development C# is the standard. For the latest version of Pocket PC you cannot develop in C or C++ but you have to use C# (plus maybe a few other options that I'm not familiar with).

#10 awesty

awesty

    Young Padawan

  • Members
  • Pip
  • 41 posts
  • Gender:Male
  • Location:Australia
  • Interests:Programming, Computers, Sport, Flash, Video Games

Posted 09 July 2007 - 11:08 PM

I have just started learning C# and I recommend learning that instead of C++. It is slower, but it is so much easier.

#11 Mezzo

Mezzo

    Young Padawan

  • Members
  • Pip
  • 102 posts
  • Gender:Male
  • Location:Toronto Ontario

Posted 10 July 2007 - 10:46 AM

Btw, C is useful but only if your writing very low level stuff. Admittedly the standard SDK for Gnome is in C while the competition is C++. But for Windows development C# is the standard. For the latest version of Pocket PC you cannot develop in C or C++ but you have to use C# (plus maybe a few other options that I'm not familiar with).


I totally disagree with the very low level stuff. While you cannot program GUI's using C (you can with C++). C is extremely useful for backend apps. This past year I've written a mouse/keyboard driver, a backend GPS program, and a game entirely in C.

I would totally advise learning C and C++. C will teach you memory management skills, good programming practices and help you get a solid understanding of the basics for other languages (Java, C#). C++ is great for OO programming.

The other good thing about both languages is that their not OS specific like VB, C# or any .NET applications. This means you can port your programs to Unix, OSX or Windows (with little to no changes to your code).

That being said I would also advise learning Java since it's being used more and more in the industry and will rpobably be the standard really soon.

#12 MetalSkin

MetalSkin

    Young Padawan

  • Members
  • Pip
  • 196 posts
  • Gender:Male
  • Location:Brisbane, Australia

Posted 10 July 2007 - 05:18 PM

I totally disagree with the very low level stuff. While you cannot program GUI's using C (you can with C++). C is extremely useful for backend apps. This past year I've written a mouse/keyboard driver, a backend GPS program, and a game entirely in C.


Well I would have said that a driver and a backend GPS program is all low level. Sure you can write an entire app in C, but why would you? Most modern games are written via scripting languages, a fair few of them now use C# as their scripting language or they have developed their own. The back end high performance stuff is written in a combination of C and C++, but the front end is normally via another language.

Also if you write for Gnome then you will write in C. Gnome is C based, sure there is a C++ SDK for Gnome but most people write for Gnome using C. So that is the main exception to C being low level. So you can write a GUI app with C, but as far as I am aware only Gnome is focused on C. Windows it would be C# and possibly C++, Windows Mobile is C# only (correct me if I'm wrong). Unix is mainly C, though front end will be C or C++ depending on which front end you use. I don't know about OSX.

But at the end of the day it is a question of what you want to do. C/C++ is fine for low level and some GUI programming, and by low level I mean drivers, back end integration with hardware, etc, but for business programming it is close to useless.

I would totally advise learning C and C++. C will teach you memory management skills, good programming practices and help you get a solid understanding of the basics for other languages (Java, C#). C++ is great for OO programming.


Well C++ may help you with Java and C# but C would help you as much as Javascript would. C doesn't enforce good programming practices, and I would argue that C++ is better than C in this regard, but still allows for slack programming practices. C# and Java both enforce stronger programming practices and are better for learning OO programming.

The other good thing about both languages is that their not OS specific like VB, C# or any .NET applications. This means you can port your programs to Unix, OSX or Windows (with little to no changes to your code).


Sorry mate but that just isn't true. C and C++ are compiled for a platform and you use SDK's available for that platform. For windows you use the Windows SDK's for gui development. The low level stuff is all different between platforms, etc. Unless you purposely write for a cross platform SDK then there is a lot of work to get an application running on OSX, Linux and Windows. From what I have heard the cross platform SDK's aren't all that perfect either. It is not a trivial task and requires a lot of effort when compared to Java.

Anyway, all said I have always enjoyed programming in C++, it's a language I enjoy that gives you all the power you need to get the job done, which Java, C# and the like take away from you (for a good reason). So if you just wish to learn programming for fun, then C and C++ are quite okay. Just don't expect to make a career from it.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users