Item.java converted to C++