example1.C:26: error: ‘substraction_class::substraction_class(int)’ cannot be overloaded
example1.C:25: error: with ‘substraction_class::substraction_class(int)’
example1.C: In constructor ‘substraction_class::substraction_class(int)’:
example1.C:26: error: ‘parameter1’ was not declared in this scope
example1.C: At global scope:
example1.C:30: error: new types may not be defined in a return type
example1.C:30: note: (perhaps a semicolon is missing after the definition of ‘substraction_class’)
example1.C:30: error: two or more data types in declaration of ‘substraction_result’
example1.C: In function ‘int main()’:
example1.C:41: error: no matching function for call to ‘substraction_class::substraction_class(int, int)’
example1.C:25: note: candidates are: substraction_class::substraction_class(int)
example1.C:20: note: substraction_class::substraction_class(const substraction_class&)
example1.C:44: error: no matching function for call to ‘addition_class::substraction_result(substraction_class&)’
example1.C:15: note: candidates are: void addition_class::substraction_result(substraction_class, substraction_class)
example1.C:47: error: no matching function for call to ‘addition_class::substraction_result()’
example1.C:15: note: candidates are: void addition_class::substraction_result(substraction_class, substraction_class)
You have Two constuctors with the same signature. This is not allowed.
Also you forgot ';' after one of your classes declaration and tried to call substraction_result() which takes two ints once with one parameter and once without parameters at all.