Xref: utzoo comp.unix.questions:13157 comp.unix.wizards:15838 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!rochester!pt.cs.cmu.edu!andrew.cmu.edu!sa1z+ From: sa1z+@andrew.cmu.edu (Sudheer Apte) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: system() --- the C function from hell? Message-ID: <8YKsTKy00WB7I9b3EN@andrew.cmu.edu> Date: 30 Apr 89 22:25:26 GMT References: <1827@uop.edu> Organization: Civil Engineering, Carnegie Mellon, Pittsburgh, PA Lines: 16 In-Reply-To: <1827@uop.edu> I suspect you've simply forgotten to allocate space for the string str. (Maybe you've declared it a char * ?) I doubt if system() has anything to do with it. So you need to define something like char str[40]; before you sprintf() into it. Thanks, Sudheer. ----------------- Sudheer Mukund Apte sa1z@andrew.cmu.edu Civil Engineering Department, Carnegie-Mellon University, ...!harvard!andrew.cmu.edu!sa1z Pittsburgh, PA 15213 ------------------------------------------------------------------------