[ create a new paste ] login | about

Link: http://codepad.org/1Ko6dHSj    [ raw code | output | fork ]

C++, pasted on Apr 20:
1
2
3
#include <iostream>
using namespace std;
int main(){ int n = 0; cin >> n; int a[n]; int i = 0, j = 0; while( i++ < n) cin >> a[i]; while(j++ < n) cout << a[j]; return 0; }


Output:
1
2
3
In function 'int main()':
Line 3: error: ISO C++ forbids variable-size array 'a'
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: