Help!!

Hi, I'm making a currency Converter program for Uni and I just have 2 problems..
I have 2 Error's with this code
1: "IntelliSense Expected a 'while'" (I have no clue where?!)
2: "error C2059: syntax error: '}'
Both on line 35, but when ever I put a '}' in, tons of errors pop up.
Any help would be great!

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
 int main() 
 
{ 
        void processAPrice( float&, int&); //Float and int& are for the parameter values
	void produceFinalData( float, int); 
	float sumInEuros; 
	int numberOfPrices;
	char answer;
		sumInEuros = 0; //Assigns sumInEuros to 0

	cout << ("How many times would you like to process today? "); 
	cin >> numberOfPrices;
	while ((answer == 'Y') && (answer == 'y'))
	do
{
    processAPrice(sumInEuros, numberOfPrices);
		for (int count = 0; count < numberOfPrices; ++count) 
			Sleep(50); //Short wait for Continue Y/N to show
			cout<<"\nContinue (Y/N)?";
		cin>> answer;		
		while ((answer != 'Y') && (answer != 'y'))
		{
			cout<<"Thank you!";
			return (0);			
				
		
		if (numberOfPrices > 0) 
		produceFinalData( sumInEuros, numberOfPrices); 
		}

system( "PAUSE"); 
return( 0); 
} 

}
Take a look at lines 13 and 14 of your code.

Syntax for a do-while loop:
1
2
3
4
do
{
   /* Do stuff */
} while ( condition );


Syntax for a while loop:
1
2
3
4
while( condition )
{
   /* Do stuff */
}
Okay Thank you so much!
Topic archived. No new replies allowed.