i am struggling with one problem in my program. For input I am given ID that is series of 3 upper case letters, like ABC
.
The problem is I have to read them somehow without using any other header file than <iostream>
and I cannot use string
nor any array types, such as char[]
or string[]
. How can I read series of multiple letters? Can I split them somehow into three chars?
稍后需要使用该ID来实现列表-这三个字母是特定列表的ID,并且还会有其他列表,并且该程序基本上必须对其执行一些操作,例如添加元素,合并等。
感谢您的帮助!
奇怪的要求,但一次只能将它们读入单独的变量中。
get
reads a single character.U可以使用scanf()或printf()方法。