This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
    Bookmark Topic Watch Topic
  • New Topic

problem different from c++

 
sheng zhong
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Report post to moderator
import java.util.*;
public class test {

public static void main(String args[]){

Vector<Vector<Double>> Stree = new Vector<Vector<Double>>();
Vector<Double> Svec = new Vector<Double>();

Svec.add(100.0);
Stree.add(Svec);
Svec.add(200.0);
Stree.add(Svec);


System.out.println("Stree 0 is "+Stree.get(0));
System.out.println("Stree 1 is "+Stree.get(1));
}
}


How can I get the result like this as C++:

Stree 0 is [100.0]
Stree 1 is [100.0, 200.0]
 
Campbell Ritchie
Sheriff
Pie
Posts: 48981
60
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't ask the same question twice
 
    Bookmark Topic Watch Topic
  • New Topic