The operator >> is not used for assignment ! You could assign using strncpy like this strncpy(names, data, 1000);. and add the include #include ...
www.google.com.tw