Is there any errors in my code?

My program is taking a long time to finish.

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
		for(int i = 0; i < v.size();i++)
		{
			outfile << v[i] << " ";
		}
		if(v.empty())
		{
		}
		else
		{
			outfile << endl;
		}
		counter++;
	}
	
	ifstream infile2("Combo.txt");
	string newline1,newline2;
	while(infile2.good())
	{
		getline(infile2, line);
		newlotto.push_back(line);
	}
	cout << newlotto.size() << endl;
	
	for(int i = 0;i < newlotto.size();i++)
	{
		for(int j = i + 1;j < newlotto.size();j++)
		{
			newline1 = newlotto[i];
			newline2 = newlotto[j];
			if(newline1 == newline2)
			{
				newlotto.erase(newlotto.begin() + j);
				counter--;
			}
		}
	}
	
}while(counter <= 292201338);
I see that inside your loop counter is decremented, but your loop ends when counter goes above 292201338.

If you're making counter smaller inside the loop, when will it be above 292201338?
You are either an idiot who doesn't even read responses or a troll. Since you've never responded to any help I've tried to give you in the past, I'm not helping you anymore.
tpb.. please you do not have to assume.

Do you think I ignore all your answers and others?
I have 4 programs trying to do the same thing but in a different way.
I used all your codes and your code is perfect.

I can print all the combinations into a file and erase them manually using the program.
Topic archived. No new replies allowed.