[英]Is there a way to Manipulate all elements of an array at once/more than one variable at once?
Given an int
array database
, instead of给定一个int
数组database
,而不是
if (user_input == int database[0] || user_input == int database[1])
{
// ...
}
Could I do something more concise, like this?我可以做一些更简洁的事情吗,像这样?
if (user_input == any variable from database)
{
// ...
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.