Hi!
I was coding the Segment Tree (Dynamic) in C++ by storing all the data of a node in a struct. While coding, I found that the following small piece of code generated a very large binary file on the compilation (32 MB). Even compilation time was a little longer than usual.
Code generating 32 MB binary file
However, while doing a slight change in the above code, the size of the binary file reduced to 20 KB (that's around 1600 times smaller).
Code generating 20 KB binary file
I use the following command to compile: g++ -o out file.cpp
, and the size of the out
(Binary File) is mentioned above.