I think my problems are because of string.

Just remove all string's and replace with char*.