Skip to main content

Why C++, when python is much easier?

Python is the easiest programming language to date because its syntax is simple to learn and understand, but why is there a need to learn C++?

C++ is a mid-level language as it was developed in 1979 after C. C++ is an extended version of C, where '++' is an increment.  C++, being close to the hardware of the computer, is irreplaceable. It is highly in demand than any other language. You don't need to learn C if you want to learn C++. You can understand the architecture of the computer hardware. It is the most widely used language for game development, applications development, and rendering engines.


Programming Languages
Languages-Pixabay



Python can be used like an object-oriented language but C++ is much more versatile and powerful. Moreover, the main thing which matters is the logic of the program. The logic in both of these languages depends upon the programmer.

Let's see the difference between the languages with an example.
Python
Python-Pixabay

Writing Hello World! Program in Python:


print ('Hello World!')
C++
C++ -Pixabay

Writing Hello World! program in C++:

1- #include <iostream>
2- using namespace std;
3- void main ()
4- {
5-          cout<<"Hello World!";
6- }

In python, we just give the command to the computer without understanding the main process the computer has to do.

Whereas, in C++ we include library functions and header files to understand the main working of the computer. If we haven't included the first two lines in the program, we would have been met with an error. iostream is a library having the compile command. Std is a standard function of taking the input and displaying the output. If we skip the 2nd line of the program, we would have written std::cout instead of cout only, to avoid errors.

C++ provides better job opportunities and high salary. Its main quality is that it's irreplaceable so that the most popular and heavy sites like Facebook, Amazon, Adobe, and Autodesk are C++ centric products.

C++ can be hard and cannot be learned in a day. On the other hand, python is way too easy and its syntax can be learned in minutes. Python may work in situations where C++ is hard.

I recommend learning C++ because when you learn this particular language, python can be learned in minutes if you need to learn. Logic depends upon the user but the thing which differentiates any language from another language is its syntax.

That's all folks. Feel free to comment.



Comments

Post a Comment

Popular posts from this blog

CEME NUST, another aspect of story....

    There has been a rise in the controversy that the students of the College of Electrical and Mechanical Engineering, NUST are not treated nicely. However, I can assure that there is no other institution in Pakistan which can provide a healthy and grooming environment for the freshmen. They may provide you the advanced technology labs and buildings, but as a matter of fact, they will not train you for your better tomorrow as CEME does.      I am a student of CEME, and most importantly the most junior DE-40 in the CEME. I am against any of the rumors trying to damage the reputation of CEME, NUST. We are taught to be better persons for our society, we are taught to speak in front of public, we are taught to take responsibilities, we are taught to deal with the things calmly, we are taught to respect our elders and peers, we are taught to make decision quickly and precisely, we are taught to lead our life in a disciplined way.     As far as tha...

Mushkpuri Diaries

        What else can be better than having fun with friends? A long awaited morning came. We were done with the OHTs, it was exhausting. Who likes exams?               A good turned evil friend of mine, kicked me out of the bed when it was 5 on the clock and I was like WTF. We reached the bus stop at 6. OK, forget about the time, we were in the Bus and we even had breakfast in the Bus. We were about to leave the boundaries of College of Electrical and Mechanical Engineering, NUST (CEME, NUST).             There were 5 Buses, we were in a great number and it was our first trip from CEME, NUST to Mushkpuri top.  4 seniors came in our Bus, afterwards. The term Senior, is often terrifying to some, but we had a lot of fun with them.         When the journey started, our beloved Class Representative (CR) started making crazy faces and moves to entertain us, but we are g...

What did the President Mamnoon Hussain said at the 72nd independence day of Pakistan?

   Independence day Celebrations       This great day begins with a lot of preparations, kids and teenagers, all in green and white. Hoisting of national flag everywhere. 31-gun salute at the capital, Islamabad, and 21-gun salutes at the provisional headquarters. A Pakistani flag-  Pixabay      The main ceremony was held at Jinnah convention center, Islamabad, where president Mamnoon Hussain hoisted the national flag. Many big personalities and foreign dignitaries also attended the ceremony including the caretaker Prime Minister Nasirul Mulk. Change of guard, as usual, was also held at the mausoleums of Allama Iqbal and Quaid-e-Azam at Lahore and Karachi. People rushed to markets to buy national flags, badges, t-shirts and other merchandises to show their patriotism for Pakistan. Pakistan's fate will be decided in terms of 'Vote'      Mamnoon Hussain congratulated the crowd for the Independence Day and said, "As ...