I was wondering if there was a way to put them together.
I explain: i liked the user to enter a coordinate like a1.
But in cin>> x; x must declared a char or a int.
Isn't there a trick to come around this? I want to avoid to ask the user two times.
I was wondering if there was a way to put them together.
I explain: i liked the user to enter a coordinate like a1.
But in cin>> x; x must declared a char or a int.
Isn't there a trick to come around this? I want to avoid to ask the user two times.
Using Windows 10 with Code Blocks and MingW.
What about:
Code:char c; int n; cin >> c >> n;
Great! Thanks a lot EVOEx!
But he still has to push "Enter" two times.
It would be good if i could do the same with only one "Enter".
Last edited by Ducky; 03-28-2009 at 06:34 AM.
Using Windows 10 with Code Blocks and MingW.
No he doesn't. What gives you that idea?
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
You're right it works with a 'char' and an 'int' but not with two 'int's.
I was trying with two int's first.
Sorry and thanks.
Using Windows 10 with Code Blocks and MingW.