assigning value to string inside global kernel

error :

error: calling a host function(“std::basic_string<char, std::char_traits, std::allocator >::operator =”) from a device/global function(“set_mine”) is not allowed
I tried using nvcc struct2.cu -arch=sm_20.
but didn’t work
struct2.cu (1.12 KB)