fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Matrix{
  5. protected:
  6. double number;
  7. public:
  8. Matrix(double n):number(n){
  9. ///....
  10. }
  11. inline std::string toString()
  12. {
  13. return to_string(number);
  14. }
  15. };
  16.  
  17. int main() {
  18. Matrix m = 10.2;
  19. cout << m.toString();
  20. return 0;
  21. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
10.200000