I want to generate random values, so i used rand() from <stdlib.h>.
The problem that i got every time the same value.
i don't knwo what is the problem.
So are there any method to reintile the buffer userd to generate random value so i will got different values in every execution or another solution ?
rand does not actually give you random numbers. It gives you numbers from a set sequence. If you use the same sequence every time, you will get the same numbers.
You change the sequence using the srand function. At the start of your code, use srand once to set the sequence.