C++ | Printing arrays

/ 26 Sept 2013 /
Nothing much, just wanted to post this so I don't have to spend a whole 30 seconds navigating through my C drive to find my C folder, so Im gonna post it here, and ask questions about it on s-o tomorrow. I have seen 35/72 of Bucky's C++ tutorials, hopefully by sunday night, I'l see at least 3 GUI C++ tutorials, same channel, wanna make me sum `o dat window'd apps, k lel...

oh , and yes, I did call the array name my name, why? because?? (can i just do sizeof(a)/4;) :((



#include <iostream>
#include <ctime>
using namespace std;

void printa(int a[], int b);

int main() {
 int samir[5] = {1,2,3,5,4};
 printa(samir, 5);
}

void printa(int a[], int b){
 cout << endl;
 for(int i = 0; i < b; i++) {
  cout << a[i] << endl;
 }
 
}
 
Copyright © 2010 M(ath)+me, All rights reserved