added double jump and sitting state
This commit is contained in:
parent
2e5c5a8dde
commit
90d07dde3f
148 changed files with 13050 additions and 0 deletions
20
term1/seminar01_overload/06_is_expensive/is_expensive.cpp
Normal file
20
term1/seminar01_overload/06_is_expensive/is_expensive.cpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#include <iostream>
|
||||
using std::cout, std::endl;
|
||||
|
||||
struct Book {
|
||||
char title[100];
|
||||
int pages;
|
||||
float price;
|
||||
};
|
||||
|
||||
bool isExpensive(const Book& b) {
|
||||
if (b.price > 1000) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int main() {
|
||||
Book b = {"One Hundred Years of Solitude", 456, 1200};
|
||||
cout << isExpensive(b) << endl;
|
||||
}
|
||||
Reference in a new issue