Why do put prototypes in the class declaration and declare the methods outside the class? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 2

Why do put prototypes in the class declaration and declare the methods outside the class?

in lots of books, i have seen the methods declare after the class. not indide the class. is there any special reason? java doesnt do that...

22nd Oct 2018, 6:04 PM
Thathsara Liyanage
Thathsara Liyanage - avatar
1 ответ
+ 2
maybe you want to declare your methods in a .h file, and define them in a .cpp file
22nd Oct 2018, 7:19 PM
Bebida Roja
Bebida Roja - avatar