不能';无法使用多部分/表单数据从表单获取数据 我用C++编写了CGI程序,但是它不能得到任何数据,使用多部分/表单数据< /代码>进行加密。简而言之,我是这样做的: char delim (10); // the delimiter std::string inps; // will store the result while (std::getline(std::cin, inps, delim)) { /* do nothing? just read the input in loop */ } // then this will interpret the result.

不能';无法使用多部分/表单数据从表单获取数据 我用C++编写了CGI程序,但是它不能得到任何数据,使用多部分/表单数据< /代码>进行加密。简而言之,我是这样做的: char delim (10); // the delimiter std::string inps; // will store the result while (std::getline(std::cin, inps, delim)) { /* do nothing? just read the input in loop */ } // then this will interpret the result.,c++,forms,http,c++11,cgi,C++,Forms,Http,C++11,Cgi,我尝试使用x-www-urlencoded,它工作正常,可以接收表单输入。但不知何故,它不会读取任何包含多部分/表单数据的内容。 有什么想法吗?已经解决了! 原来我必须注册从std::getline()获得的每一行 无法接受我自己的答案,将很快再次检查。;) char delim (10); // the delimiter std::string inps; // will store the result while (std::getline(std::cin, inps, delim)

我尝试使用
x-www-urlencoded
,它工作正常,可以接收表单输入。但不知何故,它不会读取任何包含
多部分/表单数据的内容。
有什么想法吗?

已经解决了! 原来我必须注册从
std::getline()
获得的每一行


无法接受我自己的答案,将很快再次检查。;)
char delim (10); // the delimiter
std::string inps; // will store the result

while (std::getline(std::cin, inps, delim)) { /* push_back string to a vector */ }

// then this will interpret the result.