我想写入Android中的文件,但会导致以下错误:
java.lang.IllegalArgumentException:File C:/Users/Senior/Downloads/Gps_location-master/DenverCrimeDataVisualization/app/src/main/res/raw/neighborhood_id_location.json包含路径分隔符
connexion::connexion(std::string ip, int port) {
WSADATA WSAData;
WSAStartup(MAKEWORD(2, 2), &WSAData);
sock = new SOCKET(AF_INET, SOCK_STREAM, IPPROTO_TCP); /*<--- Error ligne*/
if(*sock == INVALID_SOCKET){
std::cout << "INVALID SOCKET" << std::endl;
}
addr = new SOCKADDR_IN;
addr->sin_addr.s_addr = inet_addr(ip.data());
addr->sin_family = AF_INET;
addr->sin_port = htonl(port);
if(connect(*sock, (SOCKADDR *)addr, sizeof(*addr)) == SOCKET_ERROR) {
std::cout << "Erreur connection : " << WSAGetLastError() << std::endl;
}
message = new std::string();
}