Hello newbie programmer here. Please help me. What should I do?
#include <iostream>
#include <string>
using namespace std;
class Konut {
public:
int yas;
int metrekare;
int kat;
string isitma_turu;
Konut(int a, int b, int c, string d) {
yas = a;
metrekare = b;
kat = c;
isitma_turu = d;
}
void yazdir() {
cout << " Yas " << yas << " Metrekare " << metrekare << " Kat " << kat << " Isitma Turu " << isitma_turu << endl;
}
};
class Ciftlik_evi :public Konut {
public:
int Hayvan_sayisi;
int Merkeze_uzaklik;
getFiyat(int fiyat) {
yas* Merkeze_uzaklik * 1000000;
return fiyat;
}
};
class Villa :public Konut {
public:
int havuz_metrekaresi;
int Merkeze_uzaklik;
getFiyat(int fiyat) {
yas* Merkeze_uzaklik * 1000000;
return fiyat;
}
};
int main() {
Ciftlik_evi c1;
c1.Hayvan_sayisi = 232;
c1.Merkeze_uzaklik = 6789;
c1.getfiyat();
}
||=== Build: Debug in Salaklık (compiler: GNU GCC Compiler) ===|
C:\Users\azman\OneDrive\Masaüstü\Salaklık\main.cpp||In member function 'int Ciftlik_evi::getFiyat(int)':|
C:\Users\azman\OneDrive\Masaüstü\Salaklık\main.cpp|34|warning: statement has no effect [-Wunused-value]|
C:\Users\azman\OneDrive\Masaüstü\Salaklık\main.cpp||In member function 'int Villa::getFiyat(int)':|
C:\Users\azman\OneDrive\Masaüstü\Salaklık\main.cpp|46|warning: statement has no effect [-Wunused-value]|
C:\Users\azman\OneDrive\Masaüstü\Salaklık\main.cpp||In function 'int main()':|
C:\Users\azman\OneDrive\Masaüstü\Salaklık\main.cpp|54|error: use of deleted function 'Ciftlik_evi::Ciftlik_evi()'|
C:\Users\azman\OneDrive\Masaüstü\Salaklık\main.cpp|26|note: 'Ciftlik_evi::Ciftlik_evi()' is implicitly deleted because the default definition would be ill-formed:|
C:\Users\azman\OneDrive\Masaüstü\Salaklık\main.cpp|26|error: no matching function for call to 'Konut::Konut()'|
C:\Users\azman\OneDrive\Masaüstü\Salaklık\main.cpp|14|note: candidate: 'Konut::Konut(int, int, int, std::__cxx11::string)'|
C:\Users\azman\OneDrive\Masaüstü\Salaklık\main.cpp|14|note: candidate expects 4 arguments, 0 provided|
C:\Users\azman\OneDrive\Masaüstü\Salaklık\main.cpp|5|note: candidate: 'Konut::Konut(const Konut&)'|
C:\Users\azman\OneDrive\Masaüstü\Salaklık\main.cpp|5|note: candidate expects 1 argument, 0 provided|
C:\Users\azman\OneDrive\Masaüstü\Salaklık\main.cpp|5|note: candidate: 'Konut::Konut(Konut&&)'|
C:\Users\azman\OneDrive\Masaüstü\Salaklık\main.cpp|5|note: candidate expects 1 argument, 0 provided|
C:\Users\azman\OneDrive\Masaüstü\Salaklık\main.cpp|58|error: 'class Ciftlik_evi' has no member named 'getfiyat'; did you mean 'getFiyat'?|
||=== Build failed: 3 error(s), 2 warning(s) (0 minute(s), 0 second(s)) ===|