List scanner/re-organizer

Hello reader I am wondering how I would go about writing a C++ program that scans through the letters inputed into the program and then compare similarities to find the words in the list even if the letters are arranged in a different order(would I use an array command?). Any help appreciated, thank you very much.


Post Script
Could you please include comments and write it in standard C++ not compiler specific so I may learn not just copy.

Also could I sort the results into columns based on length of word?

For user input would I use
 
system("set /p letters=");

where letters is the name of the inputed values
Last edited on
I do not believe that you would use system("set /p letters="); as it would not return anything to your program for you to capture it. You would be better off to use the getline command for user input.
set /p ****= is a command that is compatible with MDOS as so are all of the system commands where set /p allows the "operator" of the program to input a custom value for a variable in this case the variable is named ****

also how would a "getline" command line look like?
1
2
3
4
5
main()
{
      blah;
           getline;
}
Topic archived. No new replies allowed.