Message from C, C++ talks

July 2019

— 4 times 00000100

— Somebody check it out on Stackoverflow or somewhere else

— I'm still not sure of what I texted here

— It's a long story.
To tell it short, you can have only one definition of object (google ODR), so you have it in *.cpp file.
But as it's part of your class, you need it to be in the declaration of that class, so you have it in the header.

Actually, since C++17 you can have the definition in the class declaration with inline keyword, that makes guarantee that it will have only one definition (if you don't brake it with macros, then it's UB).

https://en.cppreference.com/w/cpp/language/static

Message permanent page

— 

Got pretty clear about it. The link is also helpful and give clear idea👍🏻👍🏻Thanks for the help gameraccoon

— Hey guyss

— Could you help me with compiling one C repo?

— This one, there is a guide ho build it

-> cd src
-> make

— But it says that ldap.h is missing, any ideas why?

— We would also need some more info about what you are trying to compile and the exact error you are getting.

Message permanent page

— Did you follow instructions?

— Https://github.com/david0/ldapbrowse

— 

dependencies

ncurses
libldap
getopt

— Read the entire README

— Yup