Static Data Member Don't Occupy The Size Of A Class In C++ Programming #cppprogramming #programming

preview_player
Показать описание
JOIN ME
—————

COMPLETE PLAYLIST
————————————
C++ Tutorial For Beginners :
STL (Standard Template Library) :

INTERVIEW PLAYLIST
————————————

QUICK SHORT VIDEOS
————————————-

In this video we will learn that static data member of a class don't occupy space in class, rather they are global variables.

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

Sir I have a question, I am new too c++, so I saw yu used static function, and that’s not declared in constructor, but how’s the answer is 4 sir, yu didn’t used( count ++ ) so that it will increase, how it’s coming 4 plz explain in detail sir

Rambo
Автор

The class variables are placed on stack that is .stack Or when the class is initiated with new, then on the heap. Any static variable is placed in .bss

ArjanvanVught