In file included from main.cpp:8:0:
num.cpp:19:32: error: ISO C++ forbids declaration of 'operator+' with no type [-fpermissive]
Num::operator+(const Num& other) {
^
num.cpp:19:1: error: prototype for 'int Num::operator+(const Num&)' does not match any in class 'Num'
Num::operator+(const Num& other) {
^~~
In file included from main.cpp:7:0:
num.h:12:9: error: candidates are: Num Num::operator+(int)
Num operator+(int num);
^~~~~~~~
num.h:9:9: error: Num Num::operator+(const Num&)
Num operator+(const Num& other);
^~~~~~~~
In file included from main.cpp:8:0:
num.cpp:24:32: error: ISO C++ forbids declaration of 'operator-' with no type [-fpermissive]
Num::operator-(const Num& other) {
^
num.cpp:24:1: error: prototype for 'int Num::operator-(const Num&)' does not match any in class 'Num'
Num::operator-(const Num& other) {
^~~
In file included from main.cpp:7:0:
num.h:13:9: error: candidates are: Num Num::operator-(int)
Num operator-(int num);
^~~~~~~~
num.h:10:9: error: Num Num::operator-(const Num&)
Num operator-(const Num& other);
^~~~~~~~
In file included from main.cpp:8:0:
num.cpp:29:32: error: ISO C++ forbids declaration of 'operator*' with no type [-fpermissive]
Num::operator*(const Num& other) {
^
num.cpp:29:1: error: prototype for 'int Num::operator*(const Num&)' does not match any in class 'Num'
Num::operator*(const Num& other) {
^~~
In file included from main.cpp:7:0:
num.h:14:9: error: candidates are: Num Num::operator*(int)
Num operator*(int num);
^~~~~~~~
num.h:11:9: error: Num Num::operator*(const Num&)
Num operator*(const Num& other);
^~~~~~~~
In file included from main.cpp:8:0:
num.cpp:34:23: error: ISO C++ forbids declaration of 'operator+' with no type [-fpermissive]
Num::operator+(int num) {
^
num.cpp:34:1: error: prototype for 'int Num::operator+(int)' does not match any in class 'Num'
Num::operator+(int num) {
^~~
In file included from main.cpp:7:0:
num.h:12:9: error: candidates are: Num Num::operator+(int)
Num operator+(int num);
^~~~~~~~
num.h:9:9: error: Num Num::operator+(const Num&)
Num operator+(const Num& other);
^~~~~~~~
In file included from main.cpp:8:0:
num.cpp:39:27: error: ISO C++ forbids declaration of 'operator-' with no type [-fpermissive]
Num::operator-(int dif_num) {
^
num.cpp:39:1: error: prototype for 'int Num::operator-(int)' does not match any in class 'Num'
Num::operator-(int dif_num) {
^~~
In file included from main.cpp:7:0:
num.h:13:9: error: candidates are: Num Num::operator-(int)
Num operator-(int num);
^~~~~~~~
num.h:10:9: error: Num Num::operator-(const Num&)
Num operator-(const Num& other);
^~~~~~~~
In file included from main.cpp:8:0:
num.cpp:44:27: error: ISO C++ forbids declaration of 'operator*' with no type [-fpermissive]
Num::operator*(int dif_num) {
^
num.cpp:44:1: error: prototype for 'int Num::operator*(int)' does not match any in class 'Num'
Num::operator*(int dif_num) {
^~~
In file included from main.cpp:7:0:
num.h:14:9: error: candidates are: Num Num::operator*(int)
Num operator*(int num);
^~~~~~~~
num.h:11:9: error: Num Num::operator*(const Num&)
Num operator*(const Num& other);
^~~~~~~~
|