Read an image file C++ and put it on a socket
问题 i'm trying to develop a little web server in C++ but i have a problem when i try to read an image file and write it in a socket buffer. I found a similar function written in C that works perfectly, i cannot understand why my method doesn't work, when i connect to the server by browser and open an image file i got this output. "The image "http://127.0.0.1:7777/myimage.jpg" cannot be displayed because it contains errors." This is my method: std::string Client::getFileContent(const std::string&