So my prof has a sample .h file with the following operators at the end
//ComplexNumber.h
#include <iostream>
using namespace std;
#ifndef MY_COMPLEX_H
#define MY_COMPLEX_H
class complexNumber {
public:
complexNumber();
complexNumber(double a, double b);
void setReal(double a);
void setImaginary(double b);
double getReal();
double getImaginary();
void printComplex();
private:
double realPart;
double imaginaryPart;
};
complexNumber add(complexNumber A, complexNumber B);
complexNumber subtract(complexNumber A, complexNumber B);
complexNumber multiply(complexNumber A, complexNumber B);
complexNumber divide(complexNumber A, complexNumber B);
complexNumber operator +(complexNumber A, complexNumber B);
complexNumber operator -(complexNumber A, complexNumber B);
complexNumber operator *(complexNumber A, complexNumber B);
complexNumber operator /(complexNumber A, complexNumber B);
ostream & operator << (ostream &outs, complexNumber A);
// istream & operator >> (istream &ins, complexNumber &A);
#endif
where is he getting complexNumber A
and complexNumber B
? I don't see these as variables anywhere...