There is such a code (piece):

int count = data.getCount(); const XYZ* pData = data.getData(); this->CreateGrid(count, 3); this->SetColLabelValue(0, "x"); // тут ругается this->SetColLabelValue(1, "y"); this->SetColLabelValue(2, "z"); for (int i = 0; i < count; i++) { wxString str = ""; str << pData[i].x; this->SetCellValue(i, 0, str); str = ""; // тут тоже ругается str << pData[i].y; this->SetCellValue(i, 1, str); str = ""; str << pData[i].z; this->SetCellValue(i, 2, str); str = ""; } 

What have I done wrong?

  • So show the full error message. Usually the compiler tells you exactly which declarations are ambiguous. - Vlad from Moscow
  • pastebin.com/V5j5Zv1n Here are all the compiler messages. Here they would not get - Desmond Fox
  • one
    Try using wchar_t literals. For example, wxString str = L ""; - Vlad from Moscow
  • It seems to help. Thanks a lot - Desmond Fox
  • If it helped, then let me write it in the answer, and you thereby close the question? - Vlad from Moscow

1 answer 1

Apparently, the problem is that you compile the program using Unicode, and in this case there is no implicit constructor for strings with elements of type char .

Therefore, try using wide strings, that is, with the wchar_t element type. For example,

 wxString str = L"";