no operator >> matches these operands

I am trying to write a program which counts money and transfers it into bills. So lets say for 88 euros it will say you need 1 50 bill, 1 20 bill, 1 10 bill, 1 5 bill, 1 2 euro coin and 1 1 euro coin.

But right in the beginning it gives me an error about >> after cin.
the issue right below.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>
#include <string>
#include <math.h>

using namespace std; 


int main()
{
	int bedrag();
	{
		cout << "Voer een bedrag in tussen 0 en 100!" << endl; 
		cin >> bedrag; 
   }
}


the error occurs right after cin.
Im new to this so every tip and trick is a huge help for me!

Thanks in advance for showing this noob how to program.
 
int bedrag();


Either the () should not be present, or should be {} for default initialisation.

eg.

1
2
int bedrag;  // not initialised
int bedrag {} ; // default initialisation 


[use one or the other - not both!]
wow, didnt realise it was THAT simple!

Thank you seeplus for your time and explenation!
Topic archived. No new replies allowed.