I don't understand what you mean by
Quote:
My problem is the allcoation successfull at allocate function but when come back to main the rowptr and rowptr_1 become NULL.
You aren't USING an allocation function. You are allocating directly in main.

IF YOU ARE USING SOME CODE WHICH YOU ARE NOT SHOWING, THEN DON'T SHOW THE CODE YOU ARE NOT USING, BUT THE CODE THAT IS FAILING!!!!

I AM NOT going to play guessing games with you. Present your problem in a sensible way.

IF you are trying to use your Allocate function, INSTEAD of the code in main, then SHOW HOW YOU ARE CALLING IT. The function that you show makes NO arrangements for passing the rowpointers back to main and main shows NO arrangements to pass pointers to rowpointers which can be set by the function. Everything in the function concerning the rowpointers is a local variable and will disappear (quite normally, I assure you) when the function returns.

Last edited by DaWei; 24Apr2007 at 17:50..