Sign in to follow this  
Followers 0
Rock12

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

12 posts in this topic

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

I am looking for answer of that question.. But, I am unable to find the answer yet. :(

Share this post


Link to post
Share on other sites

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.

1 person likes this

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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++.

1 person likes this

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

3 people like this

Share this post


Link to post
Share on other sites

C++ wont teach you C# or Java. In fact C# and Java have been shaped around the limitations of C++. Having said that, C++ applications run faster as the runtime is not virtualised (.NET CLR, JRE) and if you are doing Windows development you will notice that you have a greater set of APIs for C++. Looks like Microsoft are working on a new runtime that doesn't need virtualisation and an OS that executes in that runtime. Hell it even has more than one kernel (as many processing units you can have on your machine)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.
1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.