• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 281
  • Last Modified:

Assertion at program start (involving CTime and processshellcommand)

Hi,

I am writing an application using vc++ 6.  When I start my app I get multiple (10+) assertion errors for a line under CTime:

     ASSERT(nDay >= 1 && nDay <= 31);

This is being called from the app initinstance function.  All this code was added by VC++ -- I haven't done anything with time (at least I don't think so).  

Ignoring the assertions allows the program to continue as expected.

I would like to fix this annoying problem, but am unsure where to look.  


Any help would be greatly appreciated.


Nasa
0
nasa000
Asked:
nasa000
1 Solution
 
fl0ydCommented:
Look at the call stack and you should find out easily, where the function is called from and why those assertions are raised. I would assume that it is related to uninitialized data -- have you initialzed nDay properly in the constructor?

.f
0
 
nasa000Author Commented:
No, I hadn't initilazed my dates in my constructors -- didn't realize I had to.  Fixed the problem, updated the database and it all cleared up!  Thanks


Nasa
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now