I'm studying the Accelerated C++ book
in the 7th chapter it teaches how to create random sentences from an input that goes like this
words between brackets work as categories
and <sentence> is the category that defines how the sentence will be organized
I enter the lines:
<sentence> the <nounphrase> <verb> <location>
<nounphrase> <adj> <noun>
<verb> should be
<location> in the room
the output generated could be anything like:
the red table was outside
the chair should be in the room
but ... even doing everything the book asks me to I always get the same output sentence for the same input. I don't know why
could someone check it for me ? tell me if it happens to you to ? and why it's happening to me?
I would be very very grateful.
since it's kinda big I will post the code as a response.(just to make it more readable)