Beginner in C, I'm used to using the scanf function in most of my programs. In a recent program, I entered a wrong value and the program behaved very... Strangely
After some research on the internet, I learned that this function did not check these pointers. Which is surely the cause of the program execution failure. So:
Is Scanf a function that should not be used?
And how to replace it?
Hoping to have some answers
Débutant en C, j'ai l'habitude d'utiliser la fonction scanf dans la plupart de mes programmes. Lors d'un dernier programme, j'ai rentré une mauvaise valeur et le programme c'est comporté très... Bizarrement
Après quelques recherches sur internet, j'ai appris que cette fonction ne vérifiait ces pointeurs. Ce qui est surement la cause de l'échec de l'exécution du programme. Alors :
Scanf est elle une fonction qu'il ne faut pas utiliser ?
Tgames only uses the cookies the board needs (login, preferences). Embedded videos and audio (YouTube, Dailymotion, SoundCloud…) set their own cookies: they are only loaded with your consent. Learn more