dataTest.cpp 479 B

12345678910111213141516171819202122232425
  1. #include "dataTest.h"
  2. #include <QDebug>
  3. #include <sstream>
  4. dataTest::dataTest()
  5. {
  6. for (int i = 0; i < 1000; i++) {
  7. entrys->push_back(solution(2000, i));
  8. }
  9. entrys->at(0).bits[34] = true;
  10. solution sol = entrys->at(0);
  11. qDebug() << sol.toQString();
  12. }
  13. dataTest::~dataTest()
  14. {
  15. free(entrys);
  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. }