how?????
Printable View
how?????
Writing to what kind of an array? Write what?
Code:
//char array to make a string
char hello[7];
hello="hello";
//write a number to each
int numbers[11];
for(int i=0;i<11;i++){
numbers[i]=i;
}
heres what we are suppoed to do....
have someone enter a phone #, re print whate they typed, but after that, you have to see f there were any letters, if tere were, translate them into numbers, so i have to search the array it was stord in how?
well i assume its a int array.
so you would use a for loop and loop through it, and check if it's a character. if it is, use a if/else or switch/case to check the letter and assign teh right number.
is this for school? you should have learned how to do it :)
no.. im tring to figure out diiferent ways to use arrays, i had pascal back in the day, and we did a program like it , and wated to ty it in C++ :)