dataTest.cpp 478 B

12345678910111213141516171819202122232425
  1. #include "pch.h"
  2. #include "dataTest.h"
  3. #include <QDebug>
  4. #include <sstream>
  5. dataTest::dataTest()
  6. {
  7. for (int i = 0; i < 1000; i++) {
  8. entrys.push_back(solution(2000, i));
  9. }
  10. entrys.at(0).bits[34] = true;
  11. solution sol = entrys.at(0);
  12. qDebug() << sol.toQString();
  13. }
  14. dataTest::~dataTest()
  15. {
  16. }
  17. QString dataTest::solution::toQString()
  18. {
  19. std::ostringstream os;
  20. copy(bits.begin(), bits.end(), std::ostream_iterator<bool>(os, ""));
  21. return QString::fromStdString(os.str());
  22. }