如何检查单词是否在数组中...例如:
fruits = { 'apple', 'banana' }
value = "carrot"
if not value == fruits then
print ( value .. " is not a fruit" )
end
或类似的东西?我更喜欢纯粹的Lua。
答案 0 :(得分:1)
直接的方式:
g=e+f; // will automatically construct a Derived from the result
// and then execute `Derived`'s default `operator=` which
// will call `Base`'s `operator=`