Re: input/output trouble cause segmentation fault

2011-07-25 Thread Dmitry Andreychuk
On Fri, Jul 22, 2011 at 5:04 AM, eric fs...@att.net wrote: I am hard to find any useful resource about how to use time() as seed to generate random number in web. /* or maybe I not industry enough */ plz help $ man 2 time srand( static_castunsigned int( time(0) ) ); -- Dmitry Andreychuk

Re: input/output trouble cause segmentation fault

2011-07-21 Thread Dmitry Andreychuk
On Tue, 2011-07-12 at 22:48 -0700, eric wrote: Dear advanced c/g++ programers: A program request me to enter twice input that program probably is tested good on visual c++ 7.1 on window xp, but my system is g++ on linux(Ubuntu10.04) It assume Enter some strings: a b c d ^Z Enter some

Re: input/output trouble cause segmentation fault

2011-07-21 Thread eric
Dear Andreychuk and/or ubuntu developers: thanks your reply and concern, it solved it caused by my a.out is actually Example 7-7, but I thought it is 7-8, so I enter 7-8's input(suggested by book) then it cause (bad result), /* but why, in 7-7, the main line is

input/output trouble cause segmentation fault

2011-07-12 Thread eric
Dear advanced c/g++ programers: A program request me to enter twice input that program probably is tested good on visual c++ 7.1 on window xp, but my system is g++ on linux(Ubuntu10.04) It assume Enter some strings: a b c d ^Z Enter some more strings: d e f g ^Z Union: a b c d e f g Difference: