+ 2

visual studio array

hello, How to the label showed the 1 if we input the name of one the label index will show the 1 and if input is then the label will show two and so on. thank you

1st Dec 2017, 12:47 AM
mitsu
30 Answers
+ 2
It seems you wish to create a program that accepts an index value and then retrieves the element at that value. But the index must start from 1, right? int main() { int arr[10]={1,2,3,4,5,5,6,4,2,1}; int index = 0; do { cin>>index; cout<<"Elm "<<index<< " - "<<arr[index-1]<<endl; } while(index<=10 && index>0); }
1st Dec 2017, 5:51 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 2
In the text box in the middle, will you enter the Array elements?
2nd Dec 2017, 11:58 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 1
@mitsu Sorry, I thought you wanted a C++ answer, as you tagged C++. Is your input via C++ or VB?
2nd Dec 2017, 11:52 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 1
Now, what do you want to do? Show 1 on a mouse click? Or what? Can you please explain again?
2nd Dec 2017, 11:57 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 1
i see, sorry for my task 😞
3rd Dec 2017, 6:39 AM
mitsu
+ 1
increase the index is max and button for array it’s simpan
3rd Dec 2017, 7:39 AM
mitsu
+ 1
i mean button simpan for store array
3rd Dec 2017, 7:42 AM
mitsu
+ 1
i’m forget to button show array 😭😭
3rd Dec 2017, 7:44 AM
mitsu
+ 1
i upload design again sorry make you confused
3rd Dec 2017, 8:23 AM
mitsu
+ 1
can you give me link code you made now?
3rd Dec 2017, 8:27 AM
mitsu
+ 1
it’s ok , thank you for helping me
3rd Dec 2017, 8:53 AM
mitsu
+ 1
it’s no problem 😊😊😊
3rd Dec 2017, 8:54 AM
mitsu
+ 1
it’s no problemm, this so hard for me 😂 haha
3rd Dec 2017, 9:02 AM
mitsu
+ 1
maybe i will ask you later about this . i still curious 😂 @Kinshuk
3rd Dec 2017, 9:12 AM
mitsu
0
thank you but i mean in language visual basic , how to label show 1 if button click?
2nd Dec 2017, 11:49 AM
mitsu
0
visual basic hehe sorry i’m use tag c++
2nd Dec 2017, 11:53 AM
mitsu
0
i need your help, thank you for your help thank you very much 🙏🏻
2nd Dec 2017, 11:54 AM
mitsu
0
yes show 1 on a mouse click in button and it will show in label 1 and click again it show 2 and so on
2nd Dec 2017, 12:02 PM
mitsu
0
Ill upload the code soon.
2nd Dec 2017, 12:03 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar