Thread: How well will .net C++ skills aid in learning C?

  1. #1
    Registered User
    Join Date
    Dec 2011
    Posts
    30

    How well will .net C++ skills aid in learning C?

    In college I learned C++.net, and I am wondering if anyone could tell me if what I learned will benefit me in learning C.

    When I look at C code I see alot of similarities to structure, but quite a few differences in syntax.

    Just curious if anyone can give me an idea of what level of difficulty to expect.

    Thanks.

  2. #2
    Registered User
    Join Date
    Dec 2011
    Posts
    30
    Quote Originally Posted by Cron View Post
    In college I learned C++.net, and I am wondering if anyone could tell me if what I learned will benefit me in learning C.

    When I look at C code I see alot of similarities to structure, but quite a few differences in syntax.

    Just curious if anyone can give me an idea of what level of difficulty to expect.

    Thanks.

    Guess no response means not much

  3. #3
    Registered User
    Join Date
    Nov 2012
    Posts
    1,393
    I can't say anything about "C++.net" but I would say if you are asking this question just to find someone who says "oh yeah it will help" and this will be the excuse you need to start picking up books and learn it... then I say don't wait for that somebody because it doesn't matter. If you have some experience, or even if you have no experience, and want to learn and find it interesting and fun, then that's all you need. Personaly I think C influenced a lot of languages so to me when I look at all programming languages they all look the same to me. Maybe that's somewhat of an exagerration but not much.

  4. #4
    Registered User
    Join Date
    Jan 2013
    Posts
    5
    i came from c to c++, and the real impact was in using `templates` instead of `void *` or `classes`/`structures with functions` instead of `structures with only members`.
    moreover, each language has its own coding-style (that's amazing).
    there are more than what i've mentioned, but those things are what has given me some hard time to get used to c++.

  5. #5
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,909
    Quote Originally Posted by Cron View Post
    Guess no response means not much
    Actually, it means you're impatient .

    Standard C++ in is almost a superset of standard C. That basically means that almost any standard C program will also be a valid standard C++ program. So in that regard, it will help you immensely. There is a lot of C++ syntax that is not valid C, basically all the OOP stuff, exceptions, namespaces, etc. However, almost any C program you see is technically also a valid C++ program, even if it doesn't use classes, exceptions, etc. Thus, if you can read any C++ program, you should be able to read any C program.

    The whole .net thing, however, is specific to MS stuff. Also, MS doesn't really support C any more. Yes, their VC++ compiler will compile C programs, but they have made no real effort to keep up with the changes in the C language since the 1990s, so basically .net and C don't go together so much. Certainly, if you program C for embedded devices, Linux, or anything non-MS, then .net is useless. But C++ itself is still very useful.

    What it all boils down to is this:
    Hypothetically, you learned how to program in college, not simply to use C++.net. The tools were C++ and .net, but that's largely irrelevant. What's most important, is whether you learned to solve problems algorithmically, and whether you really learned the core concepts of programming and computer science that makes language transition easy. If you have those two things, then there should be minimal difficulty in picking up C. Even if you just have the former, it should be easy. Basically, it will boil down to learning the standard C libraries, and learning what syntax is only valid in C++ (remember most C syntax is valid C++, so you know the syntax). That being said, there may be a few tough hurdles, and it will be a bit difficult to break your first-language "bias", and habits of thinking in C++.net, but it's not really that hard.
    Last edited by anduril462; 01-30-2013 at 03:56 PM.

  6. #6
    Registered User
    Join Date
    Dec 2011
    Posts
    30
    Quote Originally Posted by c99tutorial View Post
    I can't say anything about "C++.net" but I would say if you are asking this question just to find someone who says "oh yeah it will help" and this will be the excuse you need to start picking up books and learn it... then I say don't wait for that somebody because it doesn't matter. If you have some experience, or even if you have no experience, and want to learn and find it interesting and fun, then that's all you need. Personaly I think C influenced a lot of languages so to me when I look at all programming languages they all look the same to me. Maybe that's somewhat of an exagerration but not much.


    Thanks for the reply, and I was going to learn C either way because I am hoping to make contributions to linux in the future as well as opensource projects.

    You are right though programming is fun. I just got a new favorite quote that I am learning to live by:

    you never have to work on boring projects (unless your family will starve otherwise),
    and in return, you'll never allow yourself to do a half-assed job.

    After reading this I got motivated again...

    Thanks for the info.

  7. #7
    Registered User
    Join Date
    Dec 2011
    Posts
    30
    Quote Originally Posted by zw_hat View Post
    i came from c to c++, and the real impact was in using `templates` instead of `void *` or `classes`/`structures with functions` instead of `structures with only members`.
    moreover, each language has its own coding-style (that's amazing).
    there are more than what i've mentioned, but those things are what has given me some hard time to get used to c++.
    Thanks for the reply. I have used java, vb.net, c++.net, python, and lisp. My main focus was in java/C++ (I had no choice in starting garbage java it was forced and I hated every agonizing minute of it.)

    But you are right each language's coding style is different.

  8. #8
    Registered User
    Join Date
    Dec 2011
    Posts
    30
    Quote Originally Posted by anduril462 View Post
    Actually, it means you're impatient .

    Standard C++ in is almost a superset of standard C. That basically means that almost any standard C program will also be a valid standard C++ program. So in that regard, it will help you immensely. There is a lot of C++ syntax that is not valid C, basically all the OOP stuff, exceptions, namespaces, etc. However, almost any C program you see is technically also a valid C++ program, even if it doesn't use classes, exceptions, etc. Thus, if you can read any C++ program, you should be able to read any C program.

    The whole .net thing, however, is specific to MS stuff. Also, MS doesn't really support C any more. Yes, their VC++ compiler will compile C programs, but they have made no real effort to keep up with the changes in the C language since the 1990s, so basically .net and C don't go together so much. Certainly, if you program C for embedded devices, Linux, or anything non-MS, then .net is useless. But C++ itself is still very useful.

    What it all boils down to is this:
    Hypothetically, you learned how to program in college, not simply to use C++.net. The tools were C++ and .net, but that's largely irrelevant. What's most important, is whether you learned to solve problems algorithmically, and whether you really learned the core concepts of programming and computer science that makes language transition easy. If you have those two things, then there should be minimal difficulty in picking up C. Even if you just have the former, it should be easy. Basically, it will boil down to learning the standard C libraries, and learning what syntax is only valid in C++ (remember most C syntax is valid C++, so you know the syntax). That being said, there may be a few tough hurdles, and it will be a bit difficult to break your first-language "bias", and habits of thinking in C++.net, but it's not really that hard.

    Haha you remind me of a quote that I forgot to continually apply to life.

    Proverbs 17:28 Even a fool, when he holdeth his peace, is counted wise: and he that shutteth his lips is esteemed a man of understanding.

    Even though I was joking when I made the second post

    Yea I knew .net was a huge bust after college which is why I am wanting to now pickup C.

    I did start learning with Java, then vb.net, then java with C++ (forced to take java with college classes really hate the language it is a true pain the rear to use). I did learn all of the theory,algorithms, boolean algebra, program design, logic statements, loops, the core concepts like you said etc... from an excellent professor who really beat it in my head. Great stuff. C++ also really helped in reinforcement.

    So I have no worries about anything, but the language specific differences between C++ and C. I am hoping to in the future, after getting a better understanding of C, to pickup low level ASM to compliment C. That is way in the future, but hey it is my next goal.

    I love to write beautiful organized code though. I hate ugly crap where the code is practically unreadable (what a joke!).

    The one thing my professor always hammered on is COMMENT THE CODE. Hah... I had a great intro to programming teacher.

    Thanks for the response I was just curious ,since C is a lower level programming language than C++, if there was any big differences in how things were handled.


    Hopefully in the future I will be able to make some kind of a contribution to the open source efforts, and to linux itself.
    Last edited by Cron; 01-30-2013 at 05:01 PM.

  9. #9
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,907
    You already have a few languages under your belt -> You'll be fine.

    The way you approach your project design may have to change, because you may be accustomed to event-driven programs.

    Being able to make a program with C++.NET will help you with C a lot more than, say, VB.NET.

    The best way to learn is by doing it and watching how others do it. Keep an eye on this forum and see if you can fix other peoples problems as you are learning.
    Fact - Beethoven wrote his first symphony in C

  10. #10
    Registered User
    Join Date
    Dec 2011
    Posts
    30
    Quote Originally Posted by Click_here View Post
    You already have a few languages under your belt -> You'll be fine.

    The way you approach your project design may have to change, because you may be accustomed to event-driven programs.

    Being able to make a program with C++.NET will help you with C a lot more than, say, VB.NET.

    The best way to learn is by doing it and watching how others do it. Keep an eye on this forum and see if you can fix other peoples problems as you are learning.

    Yea I will keep an eye on this board.

    Thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sharpening our skills
    By elton_fan in forum Tech Board
    Replies: 3
    Last Post: 07-11-2007, 03:15 PM
  2. Job skills
    By IfYouSaySo in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 05-25-2006, 01:53 AM
  3. how to test my C skills
    By =viki= in forum C Programming
    Replies: 13
    Last Post: 01-02-2006, 11:11 PM
  4. In need of refeshing skills
    By carrja99 in forum C++ Programming
    Replies: 7
    Last Post: 01-23-2003, 04:21 PM
  5. Need math skills
    By Megatron in forum C++ Programming
    Replies: 4
    Last Post: 02-21-2002, 12:04 PM