I have written out my C++ but im not sure what the issue is

Geraldine’s Landscaping Service and Gerard’s Lawn Maintenance are merging their businesses and want to merge their customer files. Each file contains a customer number, last name, address, and property area in square feet, and each file is in customer number order. Design the logic for a program that merges the two files into one file containing all customers. Assume there are no identical customer numbers.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <cmath>

using namespace std;

void getReady();
void mergeRecords();
void readGeraldine();
void readGerald();
void checkEnd();
void finishUp();
// Declarations
	ifstream geraldineFile;
	ifstream geraldFile;
	ofstream mergedFile;
	float geraldineNum;
	float geraldineArea;
	string geraldineLastName;
	string geraldineAddress;
	float geraldNum;
	float geraldArea;
	string geraldLastName;
	string geraldAddress;
	bool areBothAtEnd = "N";
	int END_NUM = 999;
	
int main()
{
	getReady();
		while(areBothAtEnd != "Y")
		{
			mergeRecords();
		}
	finishUp();
	return 0;
}
void getReady()
{
	geraldineFile.open("GeraldinesLandscaping.txt",ios::in);
	geraldFile.open("GeraldsLandscaping.txt",ios::in);
	mergedFile.open("MergedLandscaping.txt",ios::in);
	readGeraldine();
	readGerald();
	checkEnd();
	return;
}
void readGeraldine()
{
 geraldineFile >> geraldineNum;
 geraldineFile >> geraldineLastName;
 geraldineFile >> geraldineAddress;
 geraldineFile >> geraldineArea;
 	if (!geraldineFile.eof())
 	{
 		geraldineNum = END_NUM;
	 }
return;
}
void readGerald()
{
	geraldFile >> geraldNum;
	geraldFile >> geraldLastName;
	geraldFile >> geraldAddress;
	geraldFile >> geraldArea;
		if(!geraldFile.eof())
		{
			geraldNum = END_NUM;
		}
	return;	
}
void checkEnd()
{
	if (geraldineNum = END_NUM)
	{
		if (geraldNum = END_NUM)
		{
			areBothAtEnd = END_NUM;
		}
	}
return;	
}
void mergeRecords()
{
	if(geraldineNum < geraldNum)
	{
		mergedFile << geraldineNum << '\n';
		mergedFile << geraldineLastName << '\n';
		mergedFile << geraldineAddress << '\n';
		mergedFile << geraldineArea << '\n';
		void readGeraldine();
	}
	else
	{
		mergedFile << geraldNum << '\n';
		mergedFile << geraldLastName << '\n';
		mergedFile << geraldAddress << '\n';
		mergedFile << geraldArea <<  '\n';
		void readGerald();
	}
void checkEnd();
return;	
}
void finishUp()
{
	geraldineFile.close();
	geraldFile.close();
	mergedFile.close();
	return;
}


Im not understanding why I cant get this program to run
Last edited on
Same thing here, which already has lots of replies.
https://www.cplusplus.com/forum/beginner/269756/
On line 27 bool areBothAtEnd = "N"; The value of bools are true or false
On line 76 if (geraldineNum = END_NUM) The comparison operator is ==
same on line 78
Hello GabriellaN3,

GabriellaN3 wrote:

Im not understanding why I cant get this program to run


There are many reasons.

Did you compile the program and fix the errors?

Did you understand what has been said so far? It does not look like you did.

Pseudocode is is just a guide line. Not the way the program should be written.

Some variables are not right and yo may still need more variables.

The best approach is to start small working on one part at a time. Compile often and fix errors and test as often as you need to to check if it works.

Creating multiple topics is not going to increase your responses or fix your problem quicker. It is more likely to divide peoples time and get confusing answers. Better to stick with your first topic.

Andy
Topic archived. No new replies allowed.