This solution is no good and will eventually fail:
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_.htmhttps://zorro-project.com/manual/en/aarray.htm