> Abstraction >E ncapsulation /Access Modifiers >Inheritance #include <iostream> using namespace std; class vehicle { public: vehicle() { cout<<"this is a constructor of vehicle"<<endl; } ~vehicle() { cout<<"this is a deconstructor of vehicle"<<endl; } }; class fourwheeler { public: fourwheeler() { cout<<"this is the constructor of fourwheeler"<<endl; } fourwheeler(string x) { cout<<"This is another constructor which has "<<x<<" with it"<<endl; } ~fourwheeler() { cout<<"this is deconstructor of fourwheeler"<<endl; ...
#include<bits/stdc++.h> #define s std:: int main() { //rounding error s cout<< s setprecision(17); double a(1.0); double b(.1+.1+.1+.1+.1+.1+.1+.1+.1+.1); double c(.1*10); s cout<<a<<s endl; s cout<<b<<s endl; s cout<<c<<s endl; } output: 1 0.99999999999999989 1
মন্তব্যসমূহ
একটি মন্তব্য পোস্ট করুন