Bueno, esto es lo que me piden, se como se hace en general, solo necesito que me ayudeis en como hago para que cuando salga esto:
Introduce el comando que quieres ver su descripcion: cd
Me salga esto, todo con strings multidimensionales.
cd - command directory
aki teneis la descripcion del programa x si acaso(esta en ingles)
B. Write a program to implement an interactive help system, to train users in the “Unix” operating system. The following example gives the Unix command names that will be stored in the help system, together with their description. You do not need any knowledge of Unix to write the program.
Command Description
ls list files in a directory
cd change directory
mv rename or move files to another directory
cp copy files
rm delete files
more display the contents of files
Your program should be able to carry out the operations as outlined in the menu below. See below for sample output. Output for options 3 and 4 should be of similar format. Your program should generate an error message if the user enters a menu option other than 1-5.
Welcome to the Unix help system.
1 - look up a command
2 - search for words in the description
3 – display all commands
4 – display all commands and descriptions
5 - quit
Your choice: 1
Enter command name to look up: cd
cd - change directory
Your choice: 2
Enter a word to search for: directory
The following entries contain the word 'directory':
ls
cd
mv
.
.
.
Your choice: 5
End of program
Hint: The commands and descriptions should each be stored as strings, at initialisation.
The command strings should be stored in one array and the descriptions should be stored in another.
------------------
Entiendo la estructura perfectamente, con un switch keda perfecto pero es problema es que no se como hacerlo con los arrays que me piden, alguna sugerencia x favor? Me juego la nota de un semestre!!