Help how do I stop it from print duplicated

Sep 24, 2017 at 10:35pm
When I print I don't want to print out the duplicates. As it is now, it will print

Alphabet : 3
Alright : 3
Apple : 3
Alphabet : 3
Alright : 3
Apple : 3
Alphabet : 3
Alright : 3
Apple : 3

I only want it to print

Alphabet : 3
Alright : 3
Apple : 3
Sep 24, 2017 at 11:47pm
Last edited on Sep 24, 2017 at 11:47pm
Sep 25, 2017 at 10:38am
Hello Barbatos,

PLEASE ALWAYS USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post.
http://www.cplusplus.com/articles/jEywvCM9/
http://www.cplusplus.com/articles/z13hAqkS/
Hint: You can edit your post, highlight your code and press the <> formatting button.
You can use the preview button at the bottom to see how it looks.

Your code is printing what you have told it to. Unfortunately until you post your code I have no idea what you have done or what needs fixed. With what you have posted you are not likely to get much of a response because no one knows what you have done.

If you have not read mbozzi's links do so and you will do much better.

Hope that helps,

Andy
Sep 27, 2017 at 1:16pm
Hello Barbatos,

You need to answer the questions:

What is a duplicate?

Is it the name or name and number?

Do you need to do something with the number, like add it t a total?

Where does the information come from? A file or from the progrmm?

Excluding duplicates is one thing, but if you need to use some of that information, like quantity, that is something completely different.

Not only do you need to answer these questions for your-self it would also be helpful to post the answers here.

Hoe that helps,

Andy
Topic archived. No new replies allowed.