Home > Back-end >  C language function do matrix algorithm, unable to output all the answers?
C language function do matrix algorithm, unable to output all the answers?

Time:09-19

Want to make a vector of a matrix, write a function, introduced to the head of a vector address, after matrix results in another vector b, returns the first address of the vector b, b will address assigned to a pointer in the main function, and finally print result, but the output result is like this: , I print the b in the function of each element, no problem, why there is no way to output in the main function?

CodePudding user response:

The return value of a function is int, it is an integer,

CodePudding user response:

I think [b] was released at the end of the sub function, to the pointer to the array does not exist
  • Related