Multiple Files in C++ | Introduction to Programming with C++ | Part 47

preview_player
Показать описание
C++ functions are usually split to make code more modular:
The declaration in a header file.
The definition in another .cpp file.
Programs with multiple .cpp files need to be linked at compile time:
Header files must be included in the file with main():

Plugins🔌
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

SUBSCRIBE🔔
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Relevancy dies in a heartbeat, and I would love to sustain this channel in the long run. Every subscriber counts and it really means the world if you were one of them. So please SUBSCRIBE to my CHANNEL.

Most Engrossing Videos🎬
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Gear⚙️
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Laptop: HP Spectre 13
Microphone: PC Mic

Mentions👥
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

#MultipleFiles
Рекомендации по теме
Комментарии
Автор

Good video!
But this is not true - "Programs with multiple .cpp files need to be linked at compile time" (from your video description).

You can separately compile each cpp file into an object file (machine code representation) without creating the final executable and then you can link all those together to create the final executable.

deleater