Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Array handling through its pointer
#1
Supposed that pointer p points to integer array ai (p=&ai[0]). I wonder whether there exists a way to :

1. Add a new element to array ai through pointer p.

2. Find the length of this array through this pointer (I understand that p._len does not work in this case).

Many thanks in advance.

Example :

Function tempfp11
Code:
Copy      Help
ARRAY(int) ai
ai[]=123
ai[]=3242
ai[]=324
ai[]=456
ai[]=1000

int* p
p=&ai[0]

out p[2]
#2
no, no


Forum Jump:


Users browsing this thread: 1 Guest(s)