Examples of programs where python beats C++ in readibility and the performance is(almost) unchanged? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Examples of programs where python beats C++ in readibility and the performance is(almost) unchanged?

The other day i nedded to create a custom .cpp file, which had thousands of variables, so I needed to make a program to create it. The thing is that, because in C++ there are types, I found python much better for this task, because I didnt care what type the file stream is, i just wanted to write some characters in special locations of a file. Any other examples?

10th Sep 2018, 12:29 PM
Bebida Roja
Bebida Roja - avatar
1 Answer
+ 2
you could've just put "auto" in front of each variable, to make the c++ compiler automatically recognize the type upon assignment
10th Sep 2018, 12:33 PM
hinanawi
hinanawi - avatar