Re: Getting user input in Linux?
Zach wrote:
> Hi,
>
> I run Linux 2.6.18 and am seeking a way in C to get user input. I want
> them to have the chance to enter a value and have it assigned to a
> variable.
>
> I currently have:
>
> int* s1;
int s1
> printf("Enter first integer: %d\n",s1);
> scanf(&s1);
scanf("%d", &s1);
> When I run this it automatically enters 0. It never pauses and thus
> does not allow me to type in a value.
>
> Zach
Still far from being perfect and safe, but might get you started
Bye, Jojo
|