Run Time Check Failure #3, What Do I Need To Change?

I managed to get two working so far (reading from an external file, but I can't seem to get the third one to work, can any one show me what I have done wrong? Thank you

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
  int main() {
int gardenn();

	////Lawn\\\\
	//Variables\\
	//Costs
	string lawnItem;
	float inLawnCost;
	float properLawnCost;
	ifstream catalog;
	catalog.open("priceCatalog.txt");
	std::string lawnString;
	while(catalog >> lawnString >> inLawnCost) {
		if(lawnString == "lawn")
			properLawnCost = inLawnCost;
	}
	//Length, Time & Other Variables
	int	lawnLength;			
	int lawnWidth;
	int lawnTime = 20;	

	cout << "Length of lawn required: "; // Asks for the length
	cin >> lawnLength; // Writes to variable
	cout << "Width of lawn required: "; // Asks for the width
	cin >> lawnWidth; // Writes to variable
	int lawnArea = (lawnLength * lawnWidth); //Calculates the total area
	cout << endl << "Area of lawn required is " << lawnArea << " square meters"; //Prints the total area
	cout << endl << "This will cost a total of " << (lawnArea * properLawnCost) << " pounds"; //Prints the total cost
	cout << endl << "This will take a total of " << (lawnArea * lawnTime) << " minutes" << endl << endl; //Prints total time
	int totalLawnTime = (lawnArea * lawnTime);
	
	////Concrete Patio\\\\
	//Variables\\
	//Costs
	string concreteItem;
	float inConcreteCost;
	float properConcreteCost;
	ifstream catalog1;
	catalog1.open("priceCatalog.txt");
	std::string concreteString;
	while (catalog1 >> concreteString >> inConcreteCost) {
		if(concreteString == "concrete")
			properConcreteCost = inConcreteCost;
	}

	int	concreteLength;			
	int concreteWidth;
	int concreteTime = 20;

	cout << "Length of concrete required: "; // Asks for the length
	cin >> concreteLength; // Writes to variable
	cout << "Width of concrete required: "; // Asks for the width
	cin >> concreteWidth; // Writes to variable
	int concreteArea = (concreteLength * concreteWidth); //Calculates the total area
	cout << endl << "Area of concrete required is " << concreteArea << " square meters"; //Prints the total area
	cout << endl << "This will cost a total of " << (concreteArea * properConcreteCost) << " pounds"; //Prints the total cost
	cout << endl << "This will take a total of " << (concreteArea * concreteTime) << " minutes" << endl << endl; //Prints total time
	int totalConcreteTime = (concreteArea * concreteTime);

	////Wooden Deck\\\\
	//Variables\\
	//Costs
	string woodenDeckItem;
	float inWoodenDeckCost;
	float properWoodenDeckCost;
	ifstream catalog2;
	catalog2.open("priceCatalog");
	std::string woodenDeckString;
	while (catalog2 >> woodenDeckString >> inWoodenDeckCost) {
		if(woodenDeckString == "wooden")
			properWoodenDeckCost == inWoodenDeckCost;
	}



	int	woodenDeckLength;			
	int woodenDeckWidth;
	int woodenDeckTime = 30;

	cout << "Length of wooden deck required: "; // Asks for the length
	cin >> woodenDeckLength; // Writes to variable
	cout << "Width of wooden deck required: "; // Asks for the width
	cin >> woodenDeckWidth; // Writes to variable
	int woodenDeckArea = (woodenDeckLength * woodenDeckWidth); //Calculates the total area
	cout << endl << "Area of wooden deck required is " << woodenDeckArea << " square meters"; //Prints the total area
	cout << endl << "This will cost a total of " << (woodenDeckArea * properWoodenDeckCost) << " pounds"; //Prints the total cost
	cout << endl << "This will take a total of " << (woodenDeckArea * woodenDeckTime) << " minutes" << endl << endl; //Prints total time
	int totalWoodenDeckTime = (woodenDeckArea * woodenDeckTime);
Topic archived. No new replies allowed.