dataTest.cpp 461 B

123456789101112131415161718192021222324
  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. }
  16. QString dataTest::solution::toQString()
  17. {
  18. std::ostringstream os;
  19. copy(bits.begin(), bits.end(), std::ostream_iterator<bool>(os, ""));
  20. return QString::fromStdString(os.str());
  21. }