Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio: Disable Automatic Initialization

I code my C++ assignments in Visual Studio Enterprise. However, I noticed that when I ran my code in linux to check on different platforms, that I would have errors because visual studio, regardless of what you do with your variables, initializes all variables to zero. for instance, I forgot to set the head pointer in a Linked List exercise to nullptr and VS still ran fine, but linux did not. I really want to be able to catch these errors earlier, so is there a way to disable in VS this automatic initialization?

Thanks

like image 896
Y. Lou Avatar asked Jan 19 '26 12:01

Y. Lou


1 Answers

https://msdn.microsoft.com/en-us/library/jj161081.aspx

Have you tried disabling SDL?

Right clikc your Project => Properties => C/C++ => Code Generation => Security Check => Disable Security Check.

like image 99
Jts Avatar answered Jan 21 '26 00:01

Jts



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!