Trouble with outputting

I am trying to write a really short and sweet program to compare two strings, nothing too inclusive even for a beginner. However I'm having a bit of trouble getting output. I could be missing something very simple. I figured having some other eyes look at it would be a good idea.

I haven't named the files very well but I wrote this in 6 or 7 minutes and didn't take time to label things like I probably should.

Any help or other comments would be welcome.

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
  #include <iostream>
#include <string>
#include <fstream>

int main()
{
	std::ofstream myfile1("stuff.txt");
	if (myfile1.is_open())
	{
		std::string input[3];
		std::string input2[3];
		std::ifstream myfile_input("Breaker_City name.txt");
		std::ifstream myfile_input2("Graph Breaker_City name.txt");
		for (int i = 0; i < 3; i++)
		{
			std::getline(myfile_input, input[i]);
		}
		for (int j = 0; j < 3; j++)
		{
			std::getline(myfile_input2, input2[j]);
		}

		if (input == input2)
		{
			myfile1 << "breaker " << input2 << " is MEAG Owned" << std::endl;
		}
		else
		{
			myfile1 << "breaker " << input2 << " is not MEAG Owned" << std::endl;
		}
	}
	else
	{
		std::cout << "File didn't open for some reason" << std::endl;
	}
	std::string PAUSE;
	std::cin >> PAUSE;
}
Topic archived. No new replies allowed.