*HELP* searching scrambled list in Visual C++

dstone2323

Member
Joined
Oct 3, 2005
Messages
6
i am a beginning computer science major and have completed only 1 cs class so i do not know hardly any functions in c++. i am enrolled in discrete math and have been given a huge project by my teacher. he has given me a list of letters {tdunlpaahsedeorstarrointnigrnremmlutaitemrenclduhispgoioejsttqawdrstuiauiaepeywdtys}. we then are supposed to take this list and figure out which of (Tool) the bands songs these letters make. we have to look up all of the bands songs and then make a program to figure out which songs are in the list. we must use all of the letters once and only once. i am going to be using visual c++ to write the code, but i have to have it done pretty quick so i may not be turning anything in if i cant figure out how to do this. thank you for any help anyone could give me. feel free to email me at dstone2323@hotmail.com if you need to for anything, thank you
 
let me make sure i understand what you are saying

your input will be something like:
gnihtaerbdnagnitaewsmi <---(this is the below text done backwards)

the above text will obvoiusly be scrammbled like you suggested. and you have to write a program that takes gnihtaerbdnagnitaewsmi and does a compare with each character, and can only use each character once, to every song by tool until all letters from gnihtaerbdnagnitaewsmi and all letters from the lyrics below are used up. is that correct?


the first 2 lines of sweat are:
Im sweating,
and breathing
 
yes that is correct, just on a larger scale. all of the tool songs are options and he did tell us that it is about 10 or 11 songs in the list i described earlier. i will add a post with the exact problem to show you. it is stretched out pretty long so i may have to split it up.
 
The Concept:
Imagine you have found a contest where if you can solve the following puzzle, you will be entered into a drawing
to win a pair of front row tickets to a concert. Being a
 
You could simply count hte occurence of each letter in the original list of letters, then given a song name you could just count the number of times each letter crops up and compare against the original list - if they list contains the same or greater number of letters then the song name is in there.
If you have a more specific question then feel free to ask - however nobody here is just going to do your assignment for you...
 
well we have been told that it could be done like ur talking about but the deal is, i have no idea how to do it. i dont even know how to do arrays and i know that that is how u have to do it. like list the letters total value in an array for the alphabet and then for each song list the values in array and then somehow compare them to each other using nested for loops. but all of this is greek to me having just learned how to cin the height and width to cout the area and perimeter of a box. but the teacher doesnt care if i know how to do it, he just wants it done. he is allowing us to get into groups of 2 or so to do this, but there are only 2 people in the entire class that have any hope of getting it done and they havent gotten it yet, and everybody in the class is kissing their butts trying to get them to let them put their names on the paper with them, so thats why i just figured id try it on here, but it looks like im just going to get griped at by people like u that accuse me of strictly outsourcing my work. the reason i havent been trying to get my paper off of those 2 guys is because i WOULD like to have the satisfaction of writing my own, even if it came from somebody on here, but just where i could look at it and understand how everything works. i would love to someday be able to sit and write programs like this off the top of my head, but as of now i am nowhere even close. so if anyone could help in any way, id be very greatful. and if ur going to try and gripe at me for asking for help, just keep your comments to yourself
 
Im sure this is too late for the project you were working on, but maybe it can help you with your next project.

Try looking for tutorials such as this one to help you with the basic sytanx problems you are having ("i dont even know how to do arrays"). I found this with a simple google search: c++ tutorial. Once you know the basics (through chapter 3 of the posted tutorial) I think youll have a much easier time getting what you need from this forum and from programming in general.
 
Back
Top