короче первый раз открыл Visual Studio, создал проект, вот что у меня есть: #include <iostream> #include <string> int main() { } Код #include <iostream> #include <string> int main() { } я ну ваще не шарю, мне надо сделать одну штуку. прога запускаеться > кидает GET запрос на ссылку > закрываеться помогите нахуй, я сотку на банкира дам
//--------------------------------------------------------------------------- void callback(my::client_t* sender, std::string msg) { std::cout<< msg; } //--------------------------------------------------------------------------- int main(int argc, char* argv[]) { system("chcp 1251"); system("color 0a"); using namespace std; std::string request; request.append("GET /quote/48 HTTP/1.1\r\n"); request.append("Host: bash.im\r\n"); request.append("User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20100101 Firefox/16.0\r\n"); request.append("Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n"); request.append("Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3\r\n"); request.append("Connection: keep-alive\r\n"); request.append("Cache-Control: max-age=0\r\n"); request.append("\r\n\r\n"); my::client_t client1; client1.set_port(80); if(! client1.set_addr("www.bash.im") ) client1.get_error(); client1.call= &callback; if(! client1.connect() ) client1.get_error(); if(! client1.send(request) ) client1.get_error(); system("pause"); return 0; }