I'm trying to make a text game like Zork and currently I'm trying to get a constructor to make a randomly generated number. Then with that number, print a different attack dialogue so it isn't always "The thing hits you". I'm not sure what's wrong as the compiler just runs and gives no errors. Any tips would be appreciated.
Do not call srand() multiple times (i.e. inside your constructor). srand() sets the RNG to a particular starting point. Calling srand() repeatedly can cause the RNG to return the same random numbers. srand() should be called ONCE at the beginning of main(). http://www.cplusplus.com/reference/cstdlib/srand/
Line 10,12: You set V to a random number, then you overlay V with the uninitialized value F.
I suspect you meant: