Alright, so I thought I had everything right... my problem is, the function words() doesn't pass the strings adj and noun to the fake() function... I can't figure it out... if I put a cout << adj << noun in the words() function, it gives the random words. I get nothing, though, out of the fake() function. It does compile... I am also getting a segfault (core dumped) error sometimes when I run it. If I choose 5 as my number of entries, one out of every 5 or 6 times it gives the segfault error. It looks like it runs the loop a few times before erroring out. Help?!
Line 8: You're passing adj and noun by value. words operates on a copy of the variables passed at line 56. You want to pass by reference instead so that the caller's variables are updated.
That definitely fixed the returning values! But I am still getting a segfault like every few tries. I get it after 3-6 lines when I type the number of loops in at 100. Any thoughts on that? Both txt files being used have more entries than the pop_back random count.
Thanks again!
EDIT: It may have been my count was off... I dropped the random range further by quite a bit and I don't have any segfaults anymore! I am proud of myself for being on the right track!!! I love this forum and AbstractionAnon, you deserve a hug!!! Or at least a pat on the back =)