I'm just starting and working on some very easy programs. I was doing a few little programs that use the scanf() function, such as taking the input of 4 numbers and printing out the average or a program that subtracts 2 numbers from one another, and couldnt get anything to work. I'm using ms visual c++ 6.0 on win98.
So then I tried this program:
scanf("enter a value %d ", &a);
printf("a contains %d ", a);
The value of a (and all values I try scan f'ing in) ends up being something ridiculous like -823460123. Any ideas what is up with this?
Problem With scanf() This thread says scanf has problems...is this my case?
I've tried the suggestions in these threads:
and another 1 I cant find the link to now. Any help appreciated.