I'm building a really basic monte carlo simulator in C++ and have had a real problem with random numbers. The issue is this: I seem to be able to create a generally random sequence of value using the rand() function in conjunction with time, but it seems that when I try to throw that value into a function or anything that manipulates the variable, it just ceases to work anymore.
When I run this particular one, I'll get the random number, but the program doesn't appear to pick it up and enter it into the if function, and as a result I just get a line of J's wt ha random number afterwards. I've perused forums and guides a great deal without any luck so any pointers here would be fantastic.