/
githubmirror
/
CPlusPlusThings
Обзор
Документация
Войти
/
githubmirror
/
CPlusPlusThings
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
basic_content/const/class_const/overload_example/apple.cpp
22 строки
386 B
zhangxing
support bazel complie this project and format code.
30 мар 2024, 17:00
30 мар 2024, 17:00
3c8a3f2
Код
Авторство
О чём код?
#include "apple.h" #include <iostream> int Apple::apple_number = 10; Apple::Apple(int i) { apple_number = i; } int Apple::add() { take(1); return 0; } int Apple::add(int num) const { take(num); return num; } void Apple::take(int num) const { std::cout << "take func " << num << std::endl; } int Apple::getCount() const { take(1); add(); // error return apple_number; }