• 0

C++ as a base language....!


Question

10 answers to this question

Recommended Posts

  • 0

How C++ can play an important role as a base language in order to understand the modern programming languages such as C#, Java, J# etc?

I actually learned C# without knowing anything at all about C++. Didn't even know what cout or cin was lol. I only knew a little bit of C but no OOP at all.

Link to comment
Share on other sites

  • 0

I'm fairly sure that this is a homework question for a CS class you are taking, so I'm not going to give you a direct answer. Regardless, if you Google the question you can find answers here and here. I recommend that you consider C++'s explicit memory management and object-oriented design in your answer. Thinking through the pros and cons of each language is likely to help as well.

  • Like 1
Link to comment
Share on other sites

  • 0

I'm fairly sure that this is a homework question for a CS class you are taking, so I'm not going to give you a direct answer. Regardless, if you Google the question you can find answers here and here. I recommend that you consider C++'s explicit memory management and object-oriented design in your answer.

Hey budy you are right. But, I am looking answer for one of my friend. She can't do it because of some problem so I am asking for help. I will be very thankful to you if you provide me the answer..

Link to comment
Share on other sites

  • 0

You don't need to know anything about C++ to be able to learn C# or Java. If anything C# and Java might help in learning C++ because of the similarities in syntax.

Link to comment
Share on other sites

  • 0

You don't need to know anything about C++ to be able to learn C# or Java. If anything C# and Java might help in learning C++ because of the similarities in syntax.

nope. I recommend C++ first. I did C# then I did C++ afterwards and I felt a huge leap backwards. Like every shortcut I was taught in C# I was being shown the long way in C++.

Link to comment
Share on other sites

  • 0

You don't need to know anything about C++ to be able to learn C# or Java. If anything C# and Java might help in learning C++ because of the similarities in syntax.

I don't think the question is suggesting that its necessary to learn C++ first; its merely asking what some potential advantages of learning it before other languages may be. For the serious programmer, its probably best to understand the basics before moving on to something more abstract. Abstraction is great - the bread-and-butter of modern programming - but there is no substitute for understanding how things work underneath. Even with a greater level of abstraction (and therefore ease-of-use) provided by many other modern programming languages, a programmer who understands the cost of each instruction will (hopefully) write more efficient code.

Its somewhat similar to having working knowledge of the architecture of your machine (usually in the context of assembly) when doing embedded device programming. For example, using a int in C on an 8-bit microcontroller has much higher overhead than using an unsigned char because an int is both 16-bits wide (so it can't fit in a single register) and signed (so the sign bit must be explicitly manipulated), translating into more assembly instructions. Most loops could be just as easily be written using an unsigned char to keep track of the number of iterations as an int. On modern 64-bit Intel processors this particular restriction has no bearing, but the concept is still the same: know thy architecture.

Link to comment
Share on other sites

  • 0

It's an example of terrible language design and makes you realize how lucky you are if you can program in anything else than C++ (except perhaps PHP). It's a good language to start learning programming because at that point you don't know any better and can't realize how miserable and unproductive you are because of its flaws; it also makes it a joy to discover other things that aren't complete **** such as C# or Python. It's always better to start neck-deep in the **** hole and climb out than the other way around, so learning C++ first can be a good way to go about it. Also, the more time goes the more people realize they don't actually need for C++ for much of anything, and there's still a whole bunch of software written in it, so if you have forever renounced to all pleasures of life, writing C++ is something that pays very well today.

  • Like 3
Link to comment
Share on other sites

  • 0

People use C++ because it can be high performance (depending on how good the programmers who wrote the code were). That's why the video game industry uses it almost exclusively: they need all the performance they can get. Like Dr_Asik said, its nowhere near as easy to use as Python, but there is a huge industrial code base written in it.

Link to comment
Share on other sites

  • 0
That's why the video game industry uses it almost exclusively: they need all the performance they can get.
State-of-the-art multiplatform engines are written in C++, mainly for portability to consoles but also in good part for performance, indeed. However, these engines usually allow writing much of the actual game logic in some other language - UnrealScript, Lua, C#, Boo, etc. Civilization IV was largely written in Python, for instance.
Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.