これは私のサンプルコードです:
#include <iostream>
#include <cstring>
#include <vector>
#include <iterator>
#include "MQmessage.h"
using namespace std;
int main()
{
// declaring an array to store name/value pair
struct Property user_property[15];
const char* const list[] = {"stateCode","errorCode"};
const size_t len = sizeof(list) / sizeof(list[0]);
for (size_t i = 0; i < len; ++i) {
strcpy(user_property[0].name,list[i]);
}
for (size_t i = 0; i < len; ++i) {
std::cout<<user_property[i]<<endl;
}
return 0;
}
コードで次のエラーが発生します:
std::coutの'operator<<'に一致しません
誰かが私が間違っていることを教えてもらえますか?