C++
-
Upload
emmanuel-papamanolis -
Category
Documents
-
view
219 -
download
0
description
Transcript of C++
-
C++ .
74
13
13.1 biblio. -. , , . : , . 0, 0 .
.
.
- -.
-, , 100 .
#include using namespace std; class biblio { float timi; public: int selides; char titlos[30]; biblio(); biblio(char title[]); biblio(char title[],int t); void info(); }; void biblio::info() { cout
-
C++
http://cpp.bytes.gr 75
biblio::biblio() { strcpy(titlos,""); timi = 0; selides=0; } biblio::biblio(char title[]) { strcpy(titlos,title); timi = 0; selides=0; } biblio::biblio(char title[],int t) { strcpy(titlos,title); timi=t; selides=0; } main() { biblio b1,b2("C++ "),b3("",200); b1.selides=b2.selides=b3.selides=100; b1.info(); b2.info(); b3.info(); } b1,b2 b3
: , .
. - , 0 .
. titlos .
. - titlos timi .
- selides 100.
---------------------- :100 :0 ---------------------- C++ :100 :0 ---------------------- :100 :200
-
C++ .
76
13.2 : class circle { float aktina; circle(){aktina=0;} float emvado(){return 3.14*aktina*aktina;} }; , - .
13.3 :
class test { int ar; public: void show() {cout