Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

assertion error mfc

$
0
0

Hi

I am getting an assertion error

_gcvt_s(

cBuffer,iSizeOfBuffer,dValue,iDigits)

when iSizeOfBuffer = 10, dValue = 0.057632339906428, iDigits = 2

I do not understand why I am getting an error. I am using VS2012 pro and developing an MFC app. I expected cBuffer = "0.05". If I change iSizeOfBuffer  = 20, then there is no error.

another related issue:

_gcvt_s would normaly return an error code but does not when there is an assertion error. I was hoping to trap the error if an assertion error arose.

Any help gratefully appreciated.


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>