I wish this help you You set the pointer to memory address 5, so that it points to whatever at address 5 might be. You probably wanted to make it point to an address where the value 5 is stored. For example:
int v = 5; // Store the value 5 in a normal variable
int *n = &v; // Make n contain the address of v, so that it points to the
// contents of v
warning: assignment makes integer from pointer without a cast. whats wrong?
I hope this helps . strncpy returns a pointer which you are assigning to a char. (Actually, you are assigning it to an illegal address as r->label[NAMESIZE+1] is beyond the bounds of the array.) It should be
Does that help Looking at what you are asked to do I think you just have to determine the highest and lowest int in the array and point to. You sort the array thats slower. I think it should look like that:
using namespace std;
cout<<"Enter 10 Integers: ";
for (int i=0; i < 10; i++)
//determine the lowest
if(kre_arr[i] < *low)
//determine the highest
if(kre_arr[i] > *high)
cout<<"lowest: "<<*low<<"\nhighest: "<<*high;
Initialization from incompatible pointer type [enabled by default] - whats wrong?