jeudi 17 avril 2014

VS 2013 "Scanf" unsafe


Vote count:

0




I absolutely cannot believe Visual Studio 2013 makes it this difficult to make a Hello World in C++. In Xcode, I never get any of these errors. Also, in VS 2008, I never get these errors either. It's telling me that scanf() is unsafe, and that I should use scanf_s() instead. Even worse, it's telling me that int x is uninitialized (and not just as a warning, as an error), even though it doesn't need to be initialized there. I'm wondering if it's possible to change settings so that VS2013 does not give me these error messages, or figure out what I am doing wrong.



#include <iostream>
#include <stdio.h>

int main(){
printf("I'm a pizza");
int x;
scanf("%d", x);
getchar();
}


asked 47 secs ago






Aucun commentaire:

Enregistrer un commentaire