Okay, I have 2 functions I am trying to create. The first, will read in a character string array of numbers and insert dashes into it(like in a social security number or a phone number).
The second one will read in a string of characters in an array and cut-off one of the names by inserting the delimiter('\0')
However, I am having problems doing both. Any suggestions would be great.
Code:void dashinsert(str x[]) { for(int i=0;i<23;i++) {for(int j=0;j<9;j++) cout << x[j] << endl; } cout << x[4]; } void cutoff(str x[]) { //read-in array //go through and insert '/0' after the first letter of middle name }



LinkBack URL
About LinkBacks



yet. My class just started on pointers... so, I'm a little new to it. Does it look like that is what I need to use?