thanks for your answers this is how the function looks now:

Code:
void XorEncode(char *password, int ipl, char *data, int dlength) 
{
	//char newdata[] = new char[dlength];
	//int dlength = length(data);
	//int ipl = length(password);
	int ip = 0;
	int i =0;
	for &#40;i=0; i < dlength; i++&#41; &#123;
				data&#91;i&#93; = data&#91;i&#93; ^ password&#91;ip&#93; ;
				ip++;
				if &#40;ip == ipl&#41; ip = 0;
	&#125;

&#125;
i was able to get the lengths of the 'pointer' before calling my own function. And yes length does not seem to be a valid c thing although the compiler did not complain about it but the linker did.

so i consider this solved.