|
-
Jan 17th, 2003, 12:24 PM
#1
Thread Starter
Frenzied Member
Pointer question
[code]#include <iostream>
#include <cstdlib>
void funk(int *);
const int size=8;
int arr[size]={7,6,8,1,4,3,6,2};
int main()
{
funk(arr);
system("PAUSE");
return 0;
}
void funk(int *a){
for (int j=0; j<size; ++j)
if (a[j]> a[j+1]) cout<<a[j]<<" ";
}[\code]
Why doesn't this part: if (a[j]> a[j+1]) cout<<a[j]<<" "; have to have * before a?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|