Click here to Skip to main content
15,881,588 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: how to use #pragma data_seq Pin
led mike23-Mar-09 5:03
led mike23-Mar-09 5:03 
GeneralRe: how to use #pragma data_seq Pin
Mark Salsbery23-Mar-09 10:00
Mark Salsbery23-Mar-09 10:00 
QuestionMouse hook problem Pin
g_sandipan19-Mar-09 19:50
g_sandipan19-Mar-09 19:50 
QuestionHow to Access numerical array data from various controls? Pin
isaaks16-Mar-09 13:12
isaaks16-Mar-09 13:12 
AnswerRe: How to Access numerical array data from various controls? Pin
N a v a n e e t h16-Mar-09 22:36
N a v a n e e t h16-Mar-09 22:36 
GeneralRe: How to Access numerical array data from various controls? Pin
isaaks17-Mar-09 8:52
isaaks17-Mar-09 8:52 
GeneralRe: How to Access numerical array data from various controls? Pin
N a v a n e e t h17-Mar-09 22:33
N a v a n e e t h17-Mar-09 22:33 
QuestionHaving a program create its own variables? [modified] Pin
TabascoSauce14-Mar-09 21:33
TabascoSauce14-Mar-09 21:33 
Hello, thanks for looking at this!

I am a fairly new programmer just trying to learn new things so try to bear with me.

Here is my problem:
I don't know how to code something that creates new variables that store values that change per repetition of a loop.

To clarify, here is my situation:
I am building a math flashcard program that has 3 forms. The first is irrelevant to the question. The second form uses the rand() function to make up 2 numbers for the user to either add or subtract, they enter their answer into a textbox and then hit a button that stores their answer and gives them new numbers to work with (this happens 10 times). The third box is supposed to display the questions and correct answers of the randomly generated questions.

Further clarification of my problem using an example of what happens to me:
1st Iteration of loop starts:
1. Random number generator gives the numbers 2 and 3 for the user to add
2. User enters 5 and hits the continue button
3. The continue button stores the numbers 2, 3, and 5 as variables named "1num", "2num", and "ans" respectively.
2nd Iteration of loop starts:
4. The button gives the user new numbers
5. Random number generator gives the numbers 4 and 5 for the user to add
6. User enters 9 and hits continue button
7. The continue button overwrites the previous values for "1num" 2num and "ans" with 4, 5, and 9
So on so forth

I hope I am being clear enough on what my problem is.

Basically I think I need to include something in the loop that makes new variables to store the new values so it doesn't overwrite previous ones.

Oh boy that was fun to try to explain. If there is any confusion feel free to ask questions.

Thanks for any help!!!


***Oh Geez! Edit***
So after coding some, I realized that I can't even get my program to open the other forms correctly, I have:
#include "DoMath.h"

Form^ DoMath = gcnew Form();
DoMath->Show();

and that opens up a new form when I hit the button on my first form, but its just a blank form, its not my DoMath form. Uhg, I just googled this and tried like 10 different ways, and all of them either don't work or do the same exact thing my code does. It would be much appreciated if someone could give me the correct code for this.

modified on Sunday, March 15, 2009 4:14 AM

AnswerRe: Having a program create its own variables? Pin
N a v a n e e t h15-Mar-09 5:41
N a v a n e e t h15-Mar-09 5:41 
GeneralRe: Having a program create its own variables? [modified] Pin
TabascoSauce15-Mar-09 11:36
TabascoSauce15-Mar-09 11:36 
QuestionUpdating form controls outside of form file Pin
Lavake14-Mar-09 11:14
Lavake14-Mar-09 11:14 
AnswerRe: Updating form controls outside of form file Pin
N a v a n e e t h14-Mar-09 16:28
N a v a n e e t h14-Mar-09 16:28 
GeneralRe: Updating form controls outside of form file Pin
Lavake15-Mar-09 4:06
Lavake15-Mar-09 4:06 
GeneralRe: Updating form controls outside of form file Pin
N a v a n e e t h15-Mar-09 5:21
N a v a n e e t h15-Mar-09 5:21 
QuestionProblem to communicate between forms [modified] Pin
roshihans14-Mar-09 3:44
roshihans14-Mar-09 3:44 
AnswerRe: Problem to communicate between forms Pin
N a v a n e e t h14-Mar-09 6:00
N a v a n e e t h14-Mar-09 6:00 
GeneralRe: Problem to communicate between forms Pin
roshihans14-Mar-09 16:08
roshihans14-Mar-09 16:08 
GeneralRe: Problem to communicate between forms Pin
N a v a n e e t h14-Mar-09 16:21
N a v a n e e t h14-Mar-09 16:21 
GeneralRe: Problem to communicate between forms Pin
roshihans14-Mar-09 17:33
roshihans14-Mar-09 17:33 
GeneralRe: Problem to communicate between forms Pin
N a v a n e e t h15-Mar-09 5:14
N a v a n e e t h15-Mar-09 5:14 
GeneralRe: Problem to communicate between forms Pin
roshihans15-Mar-09 18:12
roshihans15-Mar-09 18:12 
QuestionDelegates for instance methods between AppDomains... Pin
MrBhbk11-Mar-09 10:28
MrBhbk11-Mar-09 10:28 
QuestionSingle Textbox EventHandler for all Pin
Badboy22TR9-Mar-09 14:23
Badboy22TR9-Mar-09 14:23 
AnswerRe: Single Textbox EventHandler for all Pin
ky_rerun10-Mar-09 5:00
ky_rerun10-Mar-09 5:00 
AnswerRe: Single Textbox EventHandler for all Pin
Badboy22TR10-Mar-09 12:07
Badboy22TR10-Mar-09 12:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.