error C2679 overloaded function?

I am new to programming and I am getting an error that I cant track down. im sure that by problem stems from lack of experience but I think the error has to do with my overloaded function in line 7 but everything I change gives me the same error. any help would be very appreciated the error I am getting is
error C2679: binary '>>': no operator found which takes a right-hand operand of type 'overloaded-function' (or there is no acceptable conversion)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  #include "RetailItem.h"
#include <iostream>
using namespace std;

int main()
{
	retailItem r1("shirt", 33, 12.59);
	retailItem r2;
	retailItem r3;

	cout << "Welcome to the retail store!" << endl;
	cout << "Price must be greater then 0." << endl;
	cout << "Please enter a price for item 1 : ";
	cin >> r1.setPrice >> endl;

	cout << "Inventory must be greater than 0." << endl;
	cout << "Please enter units on hand for item 1 : ";
	cin >> r1.setUnits >> endl;
	cout << "Please enter the description for item 1 : ";
	cin >> r1.setDesc >> endl;
	
	
}
r1.setPrice
What is this? Looks like you're kind of trying to call a function but kind of don't know how to call a function and you're also just kind of guessing that maybe you can kind of use cin to kind of ram numbers into calling a function?

Stop.

Go back.

Learn how to call a function.
I think the error has to do with my overloaded function in line 7

Line 7 is a function? It seems like an object to me.
(btw retailItem r1("shirt", 33, 12.59); should be retailItem r1{"shirt", 33, 12.59}; if you were trying to initialize)

I don't know what you're trying to do, but it seems, like Repeater said, you're trying to 'input' to a member function?..

Maybe you can show us what's in RetailItem.h, if you wrote it, then it might also have some errors. If you didn't write it then I think you don't know how to properly use classes, so read about classes a bit more.
Thank you Repeater I do appreciate your advice. I have gone back over the material and made a few changes to my code. I have not tested it yet because I have additional compiler errors on the getter calls. Please dont correct me on them Im reviewing it now but I would appreciate some advice on if what I fixed looks correct.

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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include "RetailItem.h"
#include <iostream>
using namespace std;

int main()
{
	retailItem r1("shirt", 33, 12.59);
	retailItem r2;
	retailItem r3;
	double price;
	string description;
	int unitsOnHand;

	cout << " Welcome to the retail store!" << endl;
	cout << "Price must be greater then 0." << endl;
	cout << "Please enter a price for item 1 : ";
	cin >> price;
	r1.setPrice(price);

	cout << "\n Inventory must be greater than 0." << endl;
	cout << "Please enter units on hand for item 1 : ";
	cin >> unitsOnHand;
	r1.setUnits(unitsOnHand);

	cout << " Please enter the description for item 1 : ";
	cin >> description;
	r1.setDesc(description);

	cout << " Please enter a price for item 2 : ";
	cin >> price;
	r2.setPrice(price);

	cout << "\n Please enter units on hand for item 2 : ";
	cin >> unitsOnHand;
	r2.setUnits(unitsOnHand);

	cout << " Please enter the description for item 2 : ";
	cin >> description;
	r2.setDesc(description);

	cout << " Please enter a price for item 3 : ";
	cin >> price;
	r3.setPrice(price);

	cout << "\n Please enter units on hand for item 3 : ";
	cin >> unitsOnHand;
	r3.setUnits(unitsOnHand);

	cout << " Please enter the description for item 3 : ";
	cin >> description;
	r3.setDesc(description);

	cout << " Desplay all items" << endl;
	cout << endl << endl;
	cout << " Description: ";
	cout << r1.getDesc;
	cout << "\n Units on hand : ";
	cout << r1.getUnits;
	cout << "\n Price : ";
	cout << r1.getPrice;

	system("pause");
}
Thank you fro your help everyone I was just missing parentheses on the bottom and I added if statements for data verification. again thank you for pointing me in the right direction.
Topic archived. No new replies allowed.