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

warning C4244: 'argument' : conversion from 'CS_INT' to 'short', possible loss of data

$
0
0

Hi All,

I have a code snippet in visual studio 2008
   
warning C4996: 'ocscpy': ocscpy is not safe. Intead, use ocscpy_s
ocscpy(p1->lpwstrName, p2->lpwstrName);

error C2660: 'ocscpy_s' : function does not take 2 arguments
ocscpy_s(p1->lpwstrName, p2->lpwstrName);

From C2660 error message, I understand that 'ocscpy_s' takes 3 arguments namely destination, maxsize and source. Now that I have specified the source and destination in my code, I dono what to put in maxsize argument. How to get rid of the error without  #pragma warning(disable: 4996) ?

Thanks on any help!


Viewing all articles
Browse latest Browse all 15302

Trending Articles



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