Because assignment works in the other direction
You wrote M.input = output;
Which is the wrong way round.
In truth, this contains so many mistakes and misconceptions - I would suggest you comment the code so we can see what you think you are doing.
I think your making this way too hard. If you need to do that...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
#include <iostream>
#include <string>
using namespace std;
int main();
{
string num1
cout << "Enter a number";
GETLINE (CIN, NUM1);
//Just use getline (cin, **string**);
cout << num1
cin.get();
}
|
Last edited on
thanks so much the original OP is my other account but for some reason i got banned but thanks the assignment was the wrong way!
thx guys! :D