• 大小: 19KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-01-01
  • 标签: 15  puzzle  c++  

资源简介

c++版本的求解15数码问题算法源代码2

资源截图

代码片段和文件信息

#include 

#ifndef hr_timer
#include “hr_time.h“
#define hr_timer
#endif

double CStopWatch::LIToSecs( LARGE_INTEGER & L) {
return ((double)L.QuadPart /(double)frequency.QuadPart);
}

CStopWatch::CStopWatch(){
timer.start.QuadPart=0;
timer.stop.QuadPart=0;
QueryPerformanceFrequency( &frequency );
}

void CStopWatch::startTimer( ) {
    QueryPerformanceCounter(&timer.start);
}

void CStopWatch::stopTimer( ) {
    QueryPerformanceCounter(&timer.stop);
}


double CStopWatch::getElapsedTime() {
LARGE_INTEGER time;
time.QuadPart = timer.stop.QuadPart - timer.start.QuadPart;
    return LIToSecs( time) ;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         656  2008-09-04 17:58  hr_time.cpp
     文件         323  2008-09-04 17:58  hr_time.h
     文件       18000  2008-10-05 10:09  moves.txt
     文件       20797  2008-09-17 12:03  puzzle.cpp
     文件         877  2008-10-05 10:09  puzzle.sln
     文件       12288  2008-10-05 10:26  puzzle.suo
     文件        1300  2008-09-17 11:14  ReadMe.txt

评论

共有 条评论