Code:
//declared outside of function
FSA_panel* girlscout_fsa;	
FSA_panel* fsa_yo[150];



function setup_fsa_001()
{
	girlscout_fsa = malloc(sizeof(FSA_panel));
	
	if(!FSA_create("girlscout001.fsa",vector(700,random(500),0),girlscout_fsa))
	{
		printf("file not found");
		sys_exit("");
		return;
	}

}


function copy_fsa()
{
		fsa_yo[0] = malloc(sizeof(FSA_panel));
               memcpy(fsa_yo[0],girlscout_fsa,sizeof(FSA_panel));  

	
}




FSA_create works fine I can add as many of theses as I want with it, all the other FSA_ functions work fine. I want something a bit faster than the FSA_create function. I was hoping for a better understanding of making a copy of one struct to another and working with them independently of each other.

Last edited by FoxHound; 06/11/12 03:19.

---------------------
There is no signature here.


QUIT LOOKING FOR ONE!