Thread: C instead of C++ for Engineering

  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    9

    C instead of C++ for Engineering

    Hello everyone, first post on these forums.

    I have started my first year of Electrical Engineering at university and the course requires that you understand the C programming language. This seems a bit odd to me as it just appears that C++ would be a superier language.

    Are there any reasons why the course requires C instead of C++.

    thx

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    No one here wants to be baited into another C vs C++ discussion.


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Apr 2010
    Posts
    9
    Sorry I asked

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Me too.


    Quzah.
    Hope is the first step on the road to disappointment.

  5. #5
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Well, I'm going to fall for this trap and just argue this from an academic standpoint. Your instructors will probably require you to do projects that involve manipulation of certain devices for which C is probably a better choice, because it is a powerful low level language. Also, I feel like in order to appreciate both languages you should know both, so I doubt you will ever be in a position to argue C vs C++ if you don't know C.

  6. #6
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    I doubt they'll teach you OO programming or design anyway. So why would you want to use C++?

  7. #7
    Registered User
    Join Date
    Apr 2010
    Posts
    9
    Quote Originally Posted by claudiu View Post
    Well, I'm going to fall for this trap and just argue this from an academic standpoint. Your instructors will probably require you to do projects that involve manipulation of certain devices for which C is probably a better choice, because it is a powerful low level language. Also, I feel like in order to appreciate both languages you should know both, so I doubt you will ever be in a position to argue C vs C++ if you don't know C.
    Thx for the response , I don't realy want to start a debate over C and C++ I was just curious to why C is a better choice for engineering, and I have only been learning for a few weeks so I'm sure there is a lot more to come.

    But thank you for the response.

  8. #8
    Registered User
    Join Date
    Mar 2009
    Posts
    399
    One huge advantage of C is that it's easier to learn IMO. C++ is much more complex, and even after 5+ years of using it most people still don't grasp it fully.

    Most of the programming involved in engineering tends to be very low-level, so you don't really need any of the C++ specific features anyway. In fact, a lot of the code I've written wouldn't have taken me much longer to write in assembly.

  9. #9
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by millsy2000
    Are there any reasons why the course requires C instead of C++.
    Pose this question to your lecturer and/or the university administration.

    Anyone else who ventures an answer is just guessing. The truth is, you were supposed to learn INTERCAL in the first year, befunge in the second, but they decided to spare your sanity.

    *thread closed*
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed