prog.cpp:10:2: error: ‘String’ does not name a type
String toString(Int y)
^
prog.cpp:53:1: error: expected ‘}’ at end of input
}
^
prog.cpp: In constructor ‘Int::Int(int)’:
prog.cpp:8:8: error: request for member ‘x’ in ‘this’, which is of pointer type ‘Int* const’ (maybe you meant to use ‘->’ ?)
this.x = x;
^
prog.cpp: In member function ‘Int Int::plus(Int)’:
prog.cpp:16:7: error: no matching function for call to ‘Int::Int()’
Int temp;
^
prog.cpp:16:7: note: candidates are:
prog.cpp:6:2: note: Int::Int(int)
Int(int x)
^
prog.cpp:6:2: note: candidate expects 1 argument, 0 provided
prog.cpp:3:7: note: Int::Int(const Int&)
class Int
^
prog.cpp:3:7: note: candidate expects 1 argument, 0 provided
prog.cpp:17:17: error: request for member ‘x’ in ‘this’, which is of pointer type ‘Int* const’ (maybe you meant to use ‘->’ ?)
temp.x = this.x + y.x;
^
prog.cpp: In member function ‘Int Int::minus(Int)’:
prog.cpp:22:7: error: no matching function for call to ‘Int::Int()’
Int temp;
^
prog.cpp:22:7: note: candidates are:
prog.cpp:6:2: note: Int::Int(int)
Int(int x)
^
prog.cpp:6:2: note: candidate expects 1 argument, 0 provided
prog.cpp:3:7: note: Int::Int(const Int&)
class Int
^
prog.cpp:3:7: note: candidate expects 1 argument, 0 provided
prog.cpp:23:17: error: request for member ‘x’ in ‘this’, which is of pointer type ‘Int* const’ (maybe you meant to use ‘->’ ?)
temp.x = this.x - y.x;
^
prog.cpp: In member function ‘Int Int::times(Int)’:
prog.cpp:28:7: error: no matching function for call to ‘Int::Int()’
Int temp;
^
prog.cpp:28:7: note: candidates are:
prog.cpp:6:2: note: Int::Int(int)
Int(int x)
^
prog.cpp:6:2: note: candidate expects 1 argument, 0 provided
prog.cpp:3:7: note: Int::Int(const Int&)
class Int
^
prog.cpp:3:7: note: candidate expects 1 argument, 0 provided
prog.cpp:29:17: error: request for member ‘x’ in ‘this’, which is of pointer type ‘Int* const’ (maybe you meant to use ‘->’ ?)
temp.x = this.x * y.x;
^
prog.cpp: In member function ‘Int Int::div(Int)’:
prog.cpp:34:7: error: no matching function for call to ‘Int::Int()’
Int temp;
^
prog.cpp:34:7: note: candidates are:
prog.cpp:6:2: note: Int::Int(int)
Int(int x)
^
prog.cpp:6:2: note: candidate expects 1 argument, 0 provided
prog.cpp:3:7: note: Int::Int(const Int&)
class Int
^
prog.cpp:3:7: note: candidate expects 1 argument, 0 provided
prog.cpp:37:18: error: request for member ‘x’ in ‘this’, which is of pointer type ‘Int* const’ (maybe you meant to use ‘->’ ?)
temp.x = this.x/y.x;
^
prog.cpp:40:10: error: ‘null’ was not declared in this scope
return null;
^
prog.cpp: In member function ‘bool Int::isPrime(Int)’:
prog.cpp:44:26: error: ‘sqrt’ was not declared in this scope
for(int i=2;i<=sqrt(y.x);i++)
^
prog.cpp: At global scope:
prog.cpp:53:1: error: expected unqualified-id at end of input
}
^