changed some stuff
This commit is contained in:
11
arrays/array_for.cpp
Normal file
11
arrays/array_for.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
string cars[4] = {"Volvo", "Opel", "Volkswagen", "Auto"};
|
||||
|
||||
for (int i = 0; i < 4 ; i++) { // needs to be size of cars array else segfault
|
||||
cout << cars[i] << "\n";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user