我刚接触C++,所以在将其转换为C++时遇到了麻烦。有没有例子可以让我看看C++数组列表是什么样子的。我知道java有几个可以创建的类,但在C++中如何创建这些类呢?它们都放在一个.cpp文件中吗?
public class Main {
public static void main(String[] args) {
Inventory netFlix = new Inventory();
netFlix.add( "Prince of Persia", 140);
netFlix.add( "Clash of Titans", 223);
netFlix.add( "Avatar", 353);
netFlix.add( "Inception", 460);
netFlix.add( "Resident Evil", 105);
netFlix.add( "Devil", 624);
netFlix.add( "Memento", 117);
netFlix.add( "D2: The Mighty Ducks", 508);
netFlix.add( "The Lord of the Rings",910);
netFlix.add( "The Uninvited", 120);发布于 2010-11-04 09:40:18
请看一下这个帖子。http://www.horstmann.com/ccj2/ccjapp3.html
https://stackoverflow.com/questions/4093183
复制相似问题