0

Hi,

Actually my program will be read some input, as example :-
123
456
789
123
567
456

Then, I want to copy all the data into array and filter out any duplicate or same record..Finally the program will be print the result without duplicate records ?

Could somebody guide me how to solved this ?

3
Contributors
4
Replies
5
Views
11 Years
Discussion Span
Last Post by Salem
1

Hi,

Actually my program will be read some input, as example :-
123=saya
456=ada
132=buku
321=cerita

So, I would like to copy all the data into array or whatever and print it at the end of my program. Could some body help me ?

Don't understand. The user must enter numbers or chars? Both? To copy chars to buffer you can use for example memcopy or better memmove

1

Ok you can use those library functions which I mentioned (include string.h ). But you shold post your code for more asistance, becouse forum members can't understand clearly what problem you dealing with and what programming language you use.
[edit] OK I see you edited your post now its more clearly but anyway post your code[/edit]

1

So how much have you managed yourself?
- reading a line in
- separating the number and the word
- storing them in an array
?

Post what you can achieve, then the answer will be more likely tuned to your specific needs.

It also shows you've done some work and not just dumped your assignment on a message board.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.