Code:
# include <iostream> using namespace std; int main (void) { int arr[5],*arrf; arrf=arr+5; cout<<arr<<endl<<arrf<<endl; for(;arr<=arrf;arr=arr+1) { cout<<arr<<endl; cin>>*arr; } }
I get the following compile error:
error: incompatible types in assignment of ‘int*’ to ‘int [5]’
Can someone explain the reason behind this?
Comment