This solution is no good and will eventually fail:
Quote
correct is this:
pdata[i].cName=strf("%s",Algo);


string is just a char pointer. You are using expired/temporary pointers, so strange behavior is to be expected!

Use a char array in your struct instead, and fill it with strcpy.

https://zorro-project.com/manual/en/str_.htm
https://zorro-project.com/manual/en/aarray.htm