Summary: I have a char name[20]. I want to insert one letter at a time into this array. So I am doing this: char name [20]; int key; key = getch(); name[1] =...
Summary: Lets assume C++ :) int myArray[50]; /* Elements are indexed from 0 to 49 */ Arrays start normally with an index of 0. So to extract the information fr...
Summary: GPP's method is probably how you need to approach this problem. Take the initial array, loop through it and only extract the ones you need and assign ...
Summary: Here's one way: Declare a variable called Max. Set it equal to the first member of the array. Loop through the array and compare each member with Max...
Summary: Sorry slash, thats not correct. The .trim() function will only trim the whitespaces to the right and left of the string.. not the middle. To make th...
Summary: I an doing a project in VB. Namely I have to wirte a code for the common login program. There will be two buttons: Done and Exit and two text Boxes fo...
Summary: Many ways of doing this. One way is to put the ages into an array. Loop through the array with a For/Next loop. Put a Case Select structure inside t...
Summary: char currency[] = { "USD", "HKD" ... }; get user's code convert the user's entry to uppercase use a loop and strcmp to compare the user's entry and on...
Summary: Interesting number sequence. Generally, when you see specified number sequences that appear random, they are simply encoded. The script declares th...
Summary: Hi. I am learning one dimensional arrays in C++ out of a couple books. I noticed that a common way to initialize these arrays was using a "for" loop. ...
Summary: In C, how can u read values into an array (ex. array[row][col]) and exit from the for loop right after the user types 0 in the 1st column of any row? ...
Summary: I would like to see your efforts on this before I go too far with details... I rather see how you approach the problem instead of throw code at you. I...
Summary: I am working on a student exam system for a college project but got stuck!! Help me anyone if you can. My problem is: I created a text file called exa...
Summary: The basic fomula is: Index = Int((upperbound - lowerbound + 1) * Rnd + lowerbound) With an array starting at 0 then we can simplify to: Index = Int((u...
Summary: hello, how do i distribute data from an array into a single variable? one possibility is: int num1 = myArray[3]; int num2 = myArray[2]; int num3 = myA...
Summary: k im new and i just want to make a program that uses for loops to somehow interate and print out every unicode symbol from 0001 to 9999. basically all...
Summary: Yes, this question is regarding an assignment, but I have been killing myself for several days trying to find a solution. The programs is one that we...
Summary: for starters you can instantiate the array like this: int my_array[7][7]; and you can access each element or the array like this to set the array: my_...
Summary: No, Mr. Khash, you have it almost correct. I am happy that you can understand my question. "And what is printelement(a)?" Sorry, a mistake here. It is...
Summary: char mystr[10][15] Basically, the above sets aside 10 lots of char array[15], so to access each one of these strings, use getline while( ... ) { in...
Summary: Hi, i need some help (or pointers) regarding sorting "blocks" in an array. Example my array: GRUND TIL REKLAMAT 1 kim:data:data:data alan:data:data:d...
Summary: Sorry, Can't seem to get the less than and greater than symbols to work. Sample code isn't happening. In any case, set Max and Min to the value of an...
Summary: I see your prob. you cant write an array to a file like that. An array is basically a pointer to the memory location of its data. So what you are doin...
Summary: I was wondering how to have an array using strings. I've tried doing the following: char *arrayName[4]; *arrayName[0] = "purple"; *arrayname[1] = "re...