Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- template <class T>
- void displayArray(T s[], int r) {
- for (int i = 0; i < r; i++)
- cout << s[i] << " ";
- cout << endl;
- }
- int main() {
- int arr[] = { 1,2,3,4 };
- const int SIZE = 4;
- displayArray(arr, SIZE);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement