i have got to create an array which will stored the answers to my questions any idea on how to do this
							
						
					Array that will store answers to questions
				
					Collapse
				
			
		
	X
- 
	
	
	
		
	
	
	
		
	
		
			
				
	
	
	
	
	
	
	
	
	
Hi. Not enough informationOriginally posted by amie857i have got to create an array which will stored the answers to my questions any idea on how to do this
What data type will your answers be?
How many answers do you need to store? - 
	
	
	
		
	
	
	
		
	
		
			
				
	
	
	
	
	
	
	
	
	
and what type of data is the answer? is it an integer, float, string?Originally posted by amie857i have got to store ten answers. i am making a maths application and everytime they answer a question the question and answer needs to be stored and then produced on the answer pageComment
 - 
	
	
	
		
	
	
	
		
	
		
			
				
	
	
	
	
	
	
	
	
	
ok. here is a code snippet that will help you on your wayOriginally posted by amie857interger. you have to add a and b together to create the maths results
Code:int a; int b; int result[10]; for (int i = 0; i < 10; i++) { cout << "Input the first number for sum " << i + 1; cin >> a; cout << "Input the second number for sum " << i + 1; cin >> b; result[i] = a + b; }Comment
 - 
	
	
	
		
	
	
	
		
	
		
			
				
	
	
	
	
	
	
	
	
	
Will that really help much in the VB forum? Looks like Java, to me. Here's a quick attempt at a VB6 translation. For VB.Net, don't ask me. :)Originally posted by willakawillok. here is a code snippet that will help you on your way
Code:int a; int b; int result[10]; for (int i = 0; i < 10; i++) { cout << "Input the first number for sum " << i + 1; cin >> a; cout << "Input the second number for sum " << i + 1; cin >> b; result[i] = a + b; }P.S. This was just done on the fly in the editor here, so may need some debugging.Code:Dim a As Integer Dim b As Integer Dim result(1 To 10) As Integer For i = 1 To 10 a = Cint(InputBox("Input the first number for sum" & i)) b = Cint(InputBox("Input the second number for sum" & i)) result(i) = a + b NextComment
 - 
	
	
	
		
	
	
	
		
	
		
			
				
	
	
	
	
	
	
	
	
	
Oops. glad someone is cleaning up after me. I thought I was answering a c++ question.Originally posted by Killer42Will that really help much in the VB forum? Looks like Java, to me.Comment
 - 
	
	
	
		
	
	
	
		
	
		
			
				
	
	
	
	
	
	
	
	
	
Well, I supose not knowing c++, it's simpler for me. I just read the message and if my reaction is "what the bleep does that mean?" then something's wrong (hopefully with the post, and not me). :)Originally posted by willakawillOops. glad someone is cleaning up after me. I thought I was answering a c++ question.Comment
 - 
	
	
	
		
	
	
	
		
	
		
			
				
	
	
	
	
	
	
	
	
	
Well that's me, jack of all trades, master of none :)Originally posted by Killer42Well, I supose not knowing c++, it's simpler for me. I just read the message and if my reaction is "what the bleep does that mean?" then something's wrong (hopefully with the post, and not me). :)Comment
 
Comment