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 more strings: d e f g
> ^Z
> Union: a b c d e f g
> Difference: a b c
> Intersection: d
> all these you can get from page 273 and 274 of book(c++ cookbook)
> 
> but my test result is
> -------------------------------
> eric@eric-laptop:~/cppcookbook/ch7$ ./a.out
> Enter a series of strings: a b c d
> ^Z
> [7]+  Stopped                 ./a.out
> eric@eric-laptop:~/cppcookbook/ch7$ ./a.out
> Enter a series of strings: a b c d
> {a, b, c, d}
> Segmentation fault
> -------------------------------------------------------------------
> second case , I used <Enter><Control-D>
> first case, I used <Enter><Control-Z>

Sorry for a late answer.
I've just run it and had no segfault (using <Enter><Control-D>).
Ubuntu 11.04; g++ 4.5.2-1ubuntu3
Try debugging it with gdb.


-- 
Dmitry Andreychuk


-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss

Reply via email to