Microsoft C++ exception: std::bad_alloc at memory location - вопрос №1964233

Code: #include <stdarg.h> #include <iostream> #include <string> using namespace std; string GenerateMessage(string code, ...); int main(void) { cout << GenerateMessage(«404», «Page», «Not», «found», «end»); } string GenerateMessage(string code, ...) { string result; va_list params; va_start(params, code); result.append(code); string current = va_arg(params, string); while (current != «end») { result.append(" "); result.append(current); current = va_arg(params, string); } return result; }
Ria
21.05.16
0 ответов
C++
Ответов пока нет
Посмотреть всех экспертов из раздела Технологии > C/C++
Пользуйтесь нашим приложением Доступно на Google Play Загрузите в App Store