Offistart - Virtual Offices, Office Space, Business Support Services
*Home>>>Call Forwarding

HELP!! Lost on homework and need a tutor. I don't want you to do my homework I just want to be able to do it


It's either me or my teacher but I am just not getting this stuff. Can someone tutor me on this? I am lost and have no help.

Write a function called delete_repeats that has a partially filled array of characters as a formal parameter
and that deletes all repeated letters from the array. Since a partially filled array requires two arguments,
the function will actually have two formal parameters: an array parameter and a formal parameter of type int
that give the number of array positions used. When a letter is deleted, the remaining letters are moved forward
to fill the gap. This will create empty positions at the end of the array so that less of the array is used.
Since the formal parameter is a partially filled array, a second formal parameter of type int will tell you how
how many array positions are filled. The second formal parameter will be a call-by-reference parameter and will
be changed to show how much of the array is used after the repeated letters are removed.

dogsafire,
I haven't got far. We just got this and didn't get much info. I am in a C++ programing class and the teacher just reads from power point. Last semester only two people passed, now I see why.
I have the highest score in the class and stll don't know what the heck I am doing till we are about 3 weeks past it.

This is our first assn in arrays, we are using Walter Savitch's 6th Edition. I am just trying to get started on this prob. I am having a hard time understanding how to translate the prob into:
const int MAX = 10;
void outputA (int a[], int size);
int main () {
int a[MAX];
int i;
int x;
for (i=0;i<MAX;i++)
a[i]=0;
cout << "Input grades ending with -1 "; // Has to be an int for this situation like(-1)
cin >> x;
i = 0;
while (x>=0 && i<MAX){
a[i] = x;
i++;
cout << "next: ";
cin >> x;}
for (i=0;i<MAX;i++)
cout << a[i] << endl;return 0;
outputA(a,i);
}
void outputA (int a[], int size){
int i;
for (i=0;i<size;i++)
cout << a[i] << endl;
}

How much of this do you have done?
What language are you using (I'm guessing C or C++, but you don't say)?
What portions of the problem statement don't you understand?

Edit:

Man, I hate the way that Yahoo removes indenting!
I'll have to copy for work and put it into an editor so that I can read it more easily.

But what you have written so far only gathers input and doesn't address the function described in the problem. I don't have the book that you reference, but this is a pretty easy problem, so that shouldn't be an issue.

You are instructed to create a function named delete_repeats.
The function will accept an array of characters to operate on and an integer that tells how many entries exist in the array. The integer must be passed by reference so that its value can be changed within the function.

The function's job is to search through the array of characters looking for repeated characters. If it finds one, it removes it, shifts the remaining array entries forward, and decrements the count of the number of characters in the array.

So, to start with, can you write the function declaration?

Go ahead an email me at dogsafire@yahoo.com.
The indenting issue will be a real problem on Answers

Tags
  Shared Offices   Commercial Space   Office Space   Business Services   Business Address   Call Forwarding   Call Handling   Answering Service   Telephone Answering   Mail Forwarding   Virtual Address   Virtual Assistant
Related information
  • Bush appreciates their sense of humor?

    hmmmmm has george been drinking again?

    ...
  • REALLY EASY 10 POINTS! please, pleeeeeeeeeeeease, PLEEEEEEEEEEEEEEEEEEEEEEASE, PLEEEEEEEEEEEEEASE HELP!?

    This poem is designed to persuade young men to go to war; today it would be called a recruitment message. Notice that it is mostly about the individual glory and honor the man will get for himself...

  • Death is it just poof...Gone? How can it exist when it contradicts with certain ideas?

    I'll assume you're trying to ask the question "If the afterlife didn't exist, what would that mean to you?" This is a deep subject. I think you should ask yourself an i...

  • Writing exercises?

    You don't need writing exercises, you need discipline. (Where's my whip?) Some writers do begin without a master plan, just going where their idea takes them, but that approach is the dow...

  • Calling a company?

    Go to the place or go to their website and e-mail him. See if their's a fax machine or a pager. But I think the best thing to do would be to go down to the place and confront him

    ...
  • What's It Called When......?

    It is called either Temporal Aliasing or the Stroboscopic effect. ...

  • Government now say local beat bobbies should be contactable by the public by mobile phone?

    There will be no substance to this.... same as always, quick soundbite so the "dumb public" think the Government are doing something.... then let it quietly slip under the table. A good ...

  • I bumped into a car a day ago...not hard but what do I do?

    She could not contact you with only having your plate number. She could make a report to the Police and they could run your plate and contact you. Only problem she would have now is that more than ...

  •  

    Categories--Copyright/IP Policy--Contact Webmaster