Thread: Learning C or C++

  1. #16
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Quote Originally Posted by kinsomicrote View Post
    Ok. Thanks. I've got two compilers. Devcpp and code::block. Which is preferable??
    FYI: You got two IDEs.

    Code::Blocks sometimes is packaged with the MinGW GCC C/C++ Compiler.

    Not really used devcpp; so, I am just guessing that it likely also uses MinGW GCC C/C++ Compiler.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  2. #17
    Registered User
    Join Date
    Jun 2012
    Location
    Nigeria
    Posts
    15
    Quote Originally Posted by stahta01 View Post
    FYI: You got two IDEs.

    Code::Blocks sometimes is packaged with the MinGW GCC C/C++ Compiler.

    Not really used devcpp; so, I am just guessing that it likely also uses MinGW GCC C/C++ Compiler.

    Tim S.
    Yap. I got the Code::Block from a post on cprogramming.com
    It uses MinGW GCC C/C++ Compiler.

  3. #18
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    I'd say, go for python. It'll decrease the slope of the initial learning curve.
    On the other hand, if you go with C++ (or C), the initial curve will be steeper, but will be over much quicker as you're forced to be within the good practices of these languages.


    Quote Originally Posted by laserlight View Post
    Otherwise... well, it doesn't really matter as programming languages are tools, not cults (I hope).
    ...as said by a "C++ Witch" !

  4. #19
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    A lot of good advice in this thread.

    Anyway, don't use "Dev-C++"; development stopped before they fixed several dozens of bugs that will cause you problems.

    Beyond that, use what you feel comfortable with and to that end I'd say install a few different "IDE" suites and see which you like best.

    Soma

  5. #20
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,694
    Quote Originally Posted by kinsomicrote View Post
    Hello, am sorry if this is a wrong place to post this.
    Plz i wana go into software programming. Which language should i learn? C or C ++.
    Best approach is first to learn C and then learn C++.
    I am a student at DIT .(this approach is used there)

  6. #21
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    Best approach is first to learn C and then learn C++.
    No. It isn't.

    The best approach is to learn whichever he intends to use of simply prefers for whatever reason.

    They are two entirely different beast with different "Best Practices", "Canonical Code", and approaches to implementing designs.

    You don't need to know anything that is C to learn C++ beyond the few bits which are the same which you'd learn in learning C++ in any event.

    You don't need to know any C++ to learn C either.

    Soma

  7. #22
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    On the other hand, if you go with C++ (or C), the initial curve will be steeper, but will be over much quicker as you're forced to be within the good practices of these languages.
    Actually I'm pretty sure C/C++ doesn't force you to be good at anything.

    Compile time errors essentially boil down to syntax errors and link errors.

    Undefined behavior really doesn't teach anything. If people are lucky it just breaks, then they have to ask questions and learn how to do it the good way. And freeing dynamic memory just isn't emphasized at all in enough places, and people get away with trashing memory most of the time.

    Run time errors can be rare and when they show up they aren't described at all.

    It's awful at teaching its good practices.

  8. #23
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,694
    Quote Originally Posted by phantomotap View Post
    No. It isn't.

    The best approach is to learn whichever he intends to use of simply prefers for whatever reason.

    They are two entirely different beast with different "Best Practices", "Canonical Code", and approaches to implementing designs.

    You don't need to know anything that is C to learn C++ beyond the few bits which are the same which you'd learn in learning C++ in any event.

    You don't need to know any C++ to learn C either.

    Soma
    So you suggest a student should first learn C++ (OOP) and then C(procedural programming) ??

  9. #24
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    It's awful at teaching its good practices.
    Perhaps he intended to imply that if you don't learn the "Best Practices" you'll quickly find yourself with no legs.

    Soma

  10. #25
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    Quote Originally Posted by std10093 View Post
    So you suggest a student should first learn C++ (OOP) and then C(procedural programming) ??
    And you suggest that C++ is only about OOP ?

  11. #26
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    So you suggest a student should first learn C++ (OOP) and then C(procedural programming) ??
    That question implies that you think C++ is solely an "OOP" language or that "OOP" can't be done in C.

    That said, if a person wished to learn C++ first because they intent to use C++ or because they find it superior to C for whatever reason then C++ is what they should learn and C should be avoided until a foundation is built.

    I'd say the same for almost any other choice of language. "Intent" and "Preference" weigh a lot more than people who've never taught think.

    Soma

  12. #27
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,694
    Quote Originally Posted by manasij7479 View Post
    And you suggest thatC++ is only about OOP ?
    I know(i am student you see) only procedural and OO programming (and a little of functional).So C++ is for OOP in my mind.However i am too young i guess to be absolute.So be my guest and inform me

  13. #28
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,694
    Quote Originally Posted by phantomotap View Post
    That question implies that you think C++ is solely an "OOP" language or that "OOP" can't be done in C.

    That said, if a person wished to learn C++ first because they intent to use C++ or because they find it superior to C for whatever reason then C++ is what they should learn and C should be avoided until a foundation is built.

    I'd say the same for almost any other choice of language. "Intent" and "Preference" weigh a lot more than people who've never taught think.

    Soma
    Of cource you can write OOP in C,but if it was ok,then why C++ became so popular?I think that if you want an OOP language and have to select between C and C++,of course you would use C++.
    Same story with procedural.You could write procedural programming in C++,but C is far more appropriate

  14. #29
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    Quote Originally Posted by std10093 View Post
    Same story with procedural.You could write procedural programming in C++,but C is far more appropriate
    While the other is true, this is absolutely false and implies that you do not know C++ well.

    So be my guest and inform me
    C++ is multiparadigm.
    Read thses:
    http://en.wikipedia.org/wiki/List_of...ming_languages
    http://c2.com/cgi/wiki?MultiParadigmProgrammingLanguage
    Last edited by manasij7479; 06-30-2012 at 04:32 PM.

  15. #30
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,694
    Quote Originally Posted by manasij7479 View Post
    While the other is true, this absolutely false and implies that you do not know C++ well.
    rationalize please why not because you could use C++ and don't take advantage of anything that this language provides to you,and have a program that seems to be exactly like procedural programming.If you mean that my statement is false because the implementation changes(e.g Constructors,Destructor) then you are right,but drawing conclusions so fast for my knoweledge in C++ is not prudent

    And please answer to my previous question,i want to learn
    -you did with edit,thanks
    Last edited by std10093; 06-30-2012 at 04:39 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Learning Dos and learning Windows
    By blankstare77 in forum C++ Programming
    Replies: 8
    Last Post: 07-31-2005, 03:48 PM
  2. I'm learning C++, but need an example..
    By akrocks in forum Windows Programming
    Replies: 3
    Last Post: 03-15-2004, 08:04 PM
  3. Learning COM
    By minesweeper in forum Windows Programming
    Replies: 5
    Last Post: 03-03-2003, 03:30 AM
  4. learning C++ from C
    By gratyklz in forum C++ Programming
    Replies: 2
    Last Post: 02-23-2003, 02:09 PM