Skip to content

Instantly share code, notes, and snippets.

@Mulperi
Created March 25, 2019 10:15
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 Mulperi/ddf074ffbb3abfd9e52efa6b1003e4ce to your computer and use it in GitHub Desktop.
Save Mulperi/ddf074ffbb3abfd9e52efa6b1003e4ce to your computer and use it in GitHub Desktop.
C++ for each loop.
#include <iostream>
#include <string>
int main()
{
int arr[]{ 1, 2, 3, 4 };
for (int i : arr)
std::cout << i << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment