Path: utzoo!attcan!uunet!spool.mu.edu!samsung!munnari.oz.au!brolga!bunyip.cc.uq.oz.au!marlin.jcu.edu.au!glmwc From: glmwc@marlin.jcu.edu.au (Matt Crowd) Newsgroups: comp.sys.amiga.programmer Subject: I/O problem in the cli Message-ID: <1991Feb6.104456.24089@marlin.jcu.edu.au> Date: 6 Feb 91 10:44:56 GMT Organization: James Cook University Lines: 42 I'm having a simple problem with a small program in the cli using the C system call. program 1 - #include char buff[256]; main() { printf("Enter prog name - "); scanf("%s",buff); system(buff); printf("End of prog 1.\n"); } program 2 - #include char buff[256]; main() { printf("Enter a string (the scanf will be skipped!)- "); scanf("%s",buff); printf("String was %s\n",buff); } ----- This is compiled with Lattice C 5.1. If you run the program and type the name of program 2 into the string at program 1, the scanf in program 2 will be completely skipped when it is executed using the system call. I have tried using Execute, and fflush(stdin) without any effect. Is this my problem, a C= problem or a Lattice problem?? I am using AmigaDOS 2.02. I really don't want to have to use Amiga specific code for this. Thanks in advance, Colin Adams