Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CTime ASSERT

CTime ASSERT

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestionannouncement
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Edilson Vasconcelos de Melo Junior
    wrote on last edited by
    #1

    Hi, i have this piece of code >>>>>>>>>>>>>>>>>>>>>> struct CAddInfo { CAddInfo(){} CAddInfo(const CString& szName, DWORD iSize, bool bDir = false) :m_szName(szName), m_iSize(iSize), m_bDir(bDir){} CString m_szName; bool m_bDir; DWORD m_iSize; }; typedef CList CAddInfoList; CAddInfoList list; void CJRZipArchive::AddFolder(CString szFolder) { try { szFolder.TrimRight(_T("\\")); CFileFind ff; BOOL b = ff.FindFile(szFolder + _T("\\*")); CStringArray folders; while (b) { b = ff.FindNextFile(); if (ff.IsDots()) continue; if (ff.IsDirectory()) { folders.Add(ff.GetFilePath()); } else { CAddInfo ai; ai.m_szName = ff.GetFilePath(); CFileStatus fs; if (CFile::GetStatus(ai.m_szName, fs)) { ai.m_bDir = false; ai.m_iSize = fs.m_size; list.AddTail(ai); m_iTotal += fs.m_size; } } } for (int i = 0; i < folders.GetSize(); i++) { list.AddTail(CAddInfo(folders[i], 0, true)); // add the folder before adding its files // it is not needed to add the root folder AddFolder(folders[i]); } } catch (CException* e) { e->ReportError(); e->Delete(); } catch(...) // thrown in the STL version { AfxMessageBox("Error"); } } <<<<<<<<<<<<<<<<<<<<<<< Sometimes, this causes an ASSERT in the line 40 of timecore.cpp (the last ASSERT of a CTime constructor)... Does anyone know if there is any situation of a file the should cause it? Thank u very much, Dirso.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups