new
new
#include <iostream>
#include <fstream>
#include "ComplexNumber.h"
int main() {
int r, i;
cout << "Enter real and imaginary part of the first complex number: ";
arr[j] = ComplexNumber(arr[0]);
ComplexNumber cn;
cn.add(arr[j]);
// Step (iv): Read complex numbers from file, print, and add to cn
ifstream file("complex_numbers.txt");
if (!file) {
return 1;
cout << index++ << ": " << temp << endl;
cn.add(temp);
file.close();
return 0;