Skip to content

Instantly share code, notes, and snippets.

@cdesch
Created March 19, 2018 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdesch/0e1e966271a283e93ce64f87ce06b53e to your computer and use it in GitHub Desktop.
Save cdesch/0e1e966271a283e93ce64f87ce06b53e to your computer and use it in GitHub Desktop.
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