When Encapsulation Gets Convenient
#include <iostream> using namespace std; class User { private: string login; string password; }; int main() { User a; public: string string GetLogin() { return login return this->login; a.GetLogin(); }
A Visual Studio C++ editor shows a programmer gradually modifying a User class with private login and password fields, then adding a public getter and calling it. The joke is that the programmer casually breaks the class structure and produces buggy code while trying to access a private field, making fun of beginner programming mistakes and rushed encapsulation. It works as a reaction to messy code, failed debugging, or someone improvising a technical solution.
computer screen / экран компьютераcode editor / редактор кодаC++ source code / исходный код C++User class / класс Userlogin field / поле loginpassword field / поле passwordgetter method / метод доступаtext cursor / текстовый курсорerror indicator / индикатор ошибкиVisual Studio interface / интерфейс Visual StudioTikTok logo / логотип TikTok
- @rzeczyzabawne / 11667 2023-08-25
- Type
- video, 0:44
- Size
- 464×848 · 4.4 MiB
- Mood
- sarcastic, absurd
- Language
- en
- Added