Advertisement
akanoce

Veleno 1 10/4/17

Nov 8th, 2017
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. //rational.h
  2. namespace Numbers {
  3.    
  4.     struct Rational{
  5.         int numeratore;
  6.         int denominatore;
  7.        
  8.         Rational(int num=0, int den=1);
  9.     };
  10. .
  11. .
  12. .
  13. }//numbers
  14.  
  15. //Rational.cpp
  16. namespace Numbers{
  17. Rational{
  18.          int numeratore;
  19.          int denominatore;
  20.          
  21.          Rational(int num=0, int den =1){
  22.          numeratore = num;
  23.             denominatore = den;
  24.          }//costruttore
  25.      }  ;
  26.     //struct
  27.  
  28. .
  29. .
  30. .
  31. }namespace
  32.  
  33. rational.cpp:10: error: expected unqualified-id before ‘{’ token
  34. Rational{
  35. ^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement