Page 1 of 3 123 LastLast
Results 1 to 10 of 30

Thread: Migrating from C++ To C

  1. #1
    Join Date
    Jan 2006
    Posts
    163
    Rep Power
    0

    Default Migrating from C++ To C

    i know the some C++, and now i wanna tryout some C but every time i come across a C tutorial they start talking about what i already know in C++ such as sequence,selection and iteration,which is basically my building blocks of my programming knowledge, so i know that very, so does ne body any C tutorials that don't start with the basic that assumes that you already know the basic. I thank in advance for your replies.
    you cry i' wipe away all of your tears
    you scream i fight away all of your fears

  2. #2
    Join Date
    Jun 2003
    Posts
    3,621
    Rep Power
    24

  3. #3
    Join Date
    Sep 2002
    Posts
    80
    Rep Power
    0

    Default

    I remmeber when I asked my professor what the differences were between C and C++. If memory serves his response was C++ is C. Since this was the beginning of my programming experience in university I had absolutely no clue what he was talking about till about 3 years later when I got my hands on the Best book for learning the basics of C++ called C++ Primer. The answer turned out to really be C++ is C. Now if your not the kind of person who finds fun in reading confucious. What that really means is that C++ is a superset of C everything you do in C++ that does not include an object is C. What you end up doing when your writting pure C is making use of a ton of pointers use of structures to encapsulate data. If memory servces until a recent revision of the C standard you can even include constructors in structures. So essentiall the long and short of it is be happy you already know C you just have to learn how to turn off the oop part of your brain and do function calls and encapsulate all your data in structures if you need to encapsulate some data.

  4. #4
    Join Date
    May 2003
    Posts
    229
    Rep Power
    0

    Default

    If you already know C++ then you probably don't need a tutorial on C, what you probably need are a list of differences and some practice. You might try getting a C++ book and looking for a list if differences between C and C++ (usually at the back). I just looked at The C++ Programming Language Third Edition by Bjarne Stroustrup" and found some relevant info in Appendix B. The Annotated C++ Reference Manual has section 18.2 C++ and ANSI C which also has relevant info.

  5. #5
    Join Date
    Sep 2003
    Posts
    603
    Rep Power
    0

    Default

    dont bother, you are just wasting your time. If you know C++ you automatically know C. You will NEVER write a program in pure C, however if you get a C application to work with you will know what to do.

    think of C as a retarded version of C++

    easiparcel.com Shop online and ship to Jamaica

  6. #6
    Join Date
    Jun 2003
    Posts
    3,621
    Rep Power
    24

    Default

    Quote Originally Posted by CGPGroup
    You will NEVER write a program in pure C, however if you get a C application to work with you will know what to do.

    think of C as a retarded version of C++

    lol

    If you do UNIX systems programming, you won't be using C++. You'd more likely be wrting your code in C.

  7. #7
    Join Date
    Oct 2004
    Posts
    4,814
    Rep Power
    24

    Default

    Quote Originally Posted by BlackCryptoKnight
    lol

    If you do UNIX systems programming, you won't be using C++. You'd more likely be writing your code in C.
    yup, believe it or not C++ got lots more gotchas than C, and their is a lot to learn to actually make a program in C++ very efficient (for example virtual function calls are very slow). I learned C++ first then C and stuck to C because its just as powerful and has less bells and whistles than C++. I also do development for FreeBSD and as BCK says those are done primality in C.

    If you program for the windows environment then more than likely you will be doing C++ or .Net, but I seriously hate C++ in Windows, it feels very very retarded, seems like a whole new language in itself so I usually go with C# for Windows .
    Last edited by leoandru; May 1, 2006 at 12:19 PM.

  8. #8
    Join Date
    Jan 2005
    Posts
    3,151
    Rep Power
    0

    Default

    You will NEVER write a program in pure C
    I wonder why that fellow said that

  9. #9
    Join Date
    Sep 2003
    Posts
    603
    Rep Power
    0

    Default

    Quote Originally Posted by BlackCryptoKnight
    lol

    If you do UNIX systems programming, you won't be using C++. You'd more likely be wrting your code in C.
    I highly doubt that (look at GCC). if this is true then unix needs to be dumped in the trash, who is going to sit and write pure procedural code? then again this might explain the lack of innovation on Unix.
    Last edited by CGPGroup; May 1, 2006 at 01:10 PM.
    easiparcel.com Shop online and ship to Jamaica

  10. #10
    Join Date
    Sep 2003
    Posts
    603
    Rep Power
    0

    Default

    Quote Originally Posted by leoandru
    yup, believe it or not C++ got lots more gotchas than C, and their is a lot to learn to actually make a program in C++ very efficient (for example virtual function calls are very slow). I learned C++ first then C and stuck to C because its just as powerful and has less bells and whistles than C++. I also do development for FreeBSD and as BCK says those are done primality in C.

    If you program for the windows environment then more than likely you will be doing C++ or .Net, but I seriously hate C++ in Windows, it feels very very retarded, seems like a whole new language in itself so I usually go with C# for Windows .
    chances are you are writing C++ and not C even though you think you are writing C. if you are using a C compiler made within the last 10 years... chances are it is a C++ compiler.
    easiparcel.com Shop online and ship to Jamaica

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •