Getting user input in Linux?
- From: Zach <netrek@xxxxxxxxx>
- Date: Wed, 30 Jan 2008 19:17:25 -0800 (PST)
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;
printf("Enter first integer: %d\n",s1);
scanf(&s1);
When I run this it automatically enters 0. It never pauses and thus
does not allow me to type in a value.
Zach
.
- Follow-Ups:
- Re: Getting user input in Linux?
- From: John Bode
- Re: Getting user input in Linux?
- From: Nick Keighley
- Re: Getting user input in Linux?
- From: Joachim Schmitz
- Re: Getting user input in Linux?
- From: Walter Roberson
- Re: Getting user input in Linux?
- Prev by Date: Re: conversion ELF -> .EXE windows
- Next by Date: Re: comp.lang.c FAQ, question 4.8
- Previous by thread: conversion ELF -> .EXE windows
- Next by thread: Re: Getting user input in Linux?
- Index(es):
Relevant Pages
|