need help with coin counter

mostly I just wanna know what's wrong with the void.

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
 #include <iostream>
#include <cmath>
void coindivision(int Quarters, int Dimes, int Nickels, int Pennies);
int main()
{

	     int Quarters;
		int Dimes ;
		int Nickels ;
		int Pennies;


		std::cout << "Please enter how many Quarters you have:";
		std::cin >> Quarters;
		if (Quarters >= 0)
		std::cout << "Please enter how many Dimes you have:";
		std::cin >> Dimes;
		std::cout << "Please enter how many Nickels you have:";
		std::cin >> Nickels;
		std::cout << "Please enter how many Pennies you have:";
		std::cin >> Pennies;
		std::cout << "your total is:" << //total << "\n";
		 coindivision(Quarters,Dimes,Nickels,Pennies);
	}
void coindivision(int Quarters, int Dimes, int Nickels, int Pennies); 
{
	if (Quarters >= 0)
	{
double qtotal;
	qtotal = Quarters * 0.25;
	}
	
}
void be cool. nuttin wrong wit void, bro.
Last edited on
Error (active) E0169 expected a declaration c++w4

Error C2447 '{': missing function header (old-style formal list?) c++w4
what does these errors mean?
Last edited on
closed account (E0p9LyTq)
Look closely at line 25. The semi-colon at the end. You are not defining the function, you are redeclaring its prototype.

When you have that fixed then you have to worry about trying to chain a void function into your output stream.
Topic archived. No new replies allowed.