Write your question here.
For anyone who has a graphing calculator, there is a store function on the sto key. What it does is store a number as a letter. I was wondering if there is a similar function in C++, where I can run a random response generator and then store the output to that generator to a string, that I can then recall later. Thank you!
Define "later", do you mean after your program has closed? Because then you would have to store the string to disk. Otherwise you seem to be asking if std::string variables exist...
Well, not particularly. I'm a beginner, I don't really understand. I'm trying to read it and comprehend it. But lets say for example I want this:
1 2 3 4
int main ()
{
cout <<"His name is " <<randomname1[rand() %2]<<" .";
}
I want to know how can I "record" what the product of the random name is, and then have the program display it later in the program, if that makes sense.
Thank you, and sorry to ask again, but that program requires you inputting the information correct? Like, the user has to type in store (number) as x. Then recall x. Is it possible to, while in the program, it runs a random variable generator. And it develops an output. Then you can have it later display the output that it originally came up with?
It is perfectly possible, the I/O was just for demonstration purposes since you mentioned the TI calculators store and recall functionality. What is confusing about doing it randomly?