Does #include affect program size?

后端 未结 8 1031
一整个雨季
一整个雨季 2021-01-13 09:07

When my cpp file uses #include to add some header, does my final program\'s size gets bigger? Header aren\'t considered as compilation units, but the content of

8条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-13 09:46

    With modern compilers included files only affect the binaries size if they contain static data or if you use normal or inline function that are defined in them.

提交回复
热议问题