Question: My executable was 364KB in size. It did not use a Vector2D class so I implemented one with overloaded operators.

I changed most of my code from

```
point.x = point2.x;
point.y = point2.y;

```

to 

```
point = point2;

```

This resulted in removing nearly 1/3 of my lines of code and yet my exe is still 364KB. What exactly causes it to grow in size?

Answer: 
What type is point? If it's two floats, then the compiler will implicitly do a member-by-member copy, which is the same thing you did before.

EDIT: Apparently some people in today's crowd didn't understand this answer and compensated by downvoting. So let me elaborate:

Lines of code have NO relation to the executable size. The source code tells the compiler what assembly line to create. One line of code can cause hundreds if not thousands of assembly instructions. This is particularly true in C++, where one line can cause implicit object construction, destruction, copying, etc.

In this particular case, I suppose that "point" is a class with two floats, so using the assignment operator will perform a member-by-member copy, i.e. it takes every member individually and copies it. Which is exactly the same thing he did before, except that now it's done implicitly. The resulting assembly (and thus executable size) is the same.
Also, check if you have lot of static/global objects. This substantially increase your exe size if they are not zero initialized. 

For example:

```
int temp[100] = {0};
int main()
{

}

```

size of the above program is 9140 bytes on my linux machine. 

if I initialize temp array to 5, then the size will shoot up by around 400 bytes. The size of the below program on my linux machine is 9588.

```
int temp[100] = {5};
int main()
{

}

```

This is because, zero initialized global objects go into .bss segment, which ill be initialized at once during program startup. Where as non zero initialized objects contents will be embedded in the exe itself.