Array as result of function
#1

Hi, i want to make stock that will read from file in array, but i dont know how to return array changed, i tried
Код:
stock FUcitajNiz(&a[][], nizfile[], &n)
{
	new UpisData[128];
	new File: UpisFajl;
	UpisFajl = fopen(nizfile, io_read);
	if(UpisFajl)
	{
		n = 0;
		while ( fread( UpisFajl , UpisData , sizeof( UpisData ) ) )
		{
	 		strmid(a[n], UpisData, 0, strlen(UpisData), 255);
	 		n++;
	  	}
		fclose(UpisFajl);
	}
	return 1;
}
But this return error...
Reply


Messages In This Thread
Array as result of function - by ZeroOP - 17.08.2015, 08:28
Re: Array as result of function - by Jefff - 17.08.2015, 15:06

Forum Jump:


Users browsing this thread: 1 Guest(s)