Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Vector<int> my_array = new Vector<int>;
my_array.add(1);
my_array.add(2);
for (int i = 0; i < my_array.length(); i++){
}
foreach(int i in my_array) {
}
for (int i = 0; i < 10; i++){
cout << "i: " << i << endl;
}
0..9.each { |i| puts "i: #{i}" }
0..9.each do |i|
puts "i: " + i
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.