hacer un menú donde se implementen cada uno de los comandos del sistema
Publicado por Jose (9 intervenciones) el 19/04/2021 09:25:31
Soy principiante, debo hacer un menú donde se implementen cada uno de los comandos del sistema desde el compilador (comando “system” de la librería “windows.h”) , me sale un error y no se que hacer, por favor, consejos.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <iostream>
#include <windows.h>
using namespace std;
void Menu(){
int O;
for(;;){
system("CLS");
cout<<"Menu que contiene todos los comandos del CMD de Windows, implementados a partir del system"<<endl;
cout<<"1. ATTRIB"<<endl<<"2. BREAK"<<endl<<"3. BCDEDIT"<<endl<<"4. CACLS"<<endl<<"5. CALL"<<endl<<"6. CD"<<endl<<"7. CHCP"<<endl<<"8. CHDIR"<<endl
<<"9. CHKDSK"<<endl<<"10. CHKNTFS"<<endl<<"11. CLS"<<endl<<"12. CMD"<<endl<<"13. COLOR"<<endl<<"14. COMP"<<endl<<"15. COMPACT"<<endl<<"16. CONVERT"<<endl
<<"17. COPY"<<endl<<"18. DATE"<<endl<<"19. DEL"<<endl<<"20. DIR"<<endl<<"21. DISKPART"<<endl<<"22. DOSKEY"<<endl<<"23. DRIVERQUERY"<<endl<<"24. ECHO"<<endl
<<"25. ENDLOCAL"<<endl<<"26. ERASE"<<endl<<"27. EXIT"<<endl<<"28. FC"<<endl<<"29. FIND"<<endl<<"30. FINDSTR"<<endl<<"31. FOR"<<endl<<"32. FORMAT"<<endl
<<"33. FSUTIL"<<endl<<"34. FTYPE"<<endl<<"35. GOTO"<<endl<<"36. GPRESULT"<<endl<<"37. GRAFTABL"<<endl<<"38. HELP"<<endl<<"39. ICACLS"<<endl<<"40. IF"<<endl
<<"41. LABEL"<<endl<<"42. MD"<<endl<<"43. MKDIR"<<endl<<"44. MODE"<<endl<<"45. MORE"<<endl<<"46. MOVE"<<endl<<"47. OPENFILES"<<endl<<"48. PATH"<<endl
<<"49. PAUSE"<<endl<<"50. POPD"<<endl<<"51. PRINT"<<endl<<"52. PROMPT"<<endl<<"53. PUSHD"<<endl<<"54. RD"<<endl<<"55. RECOVER"<<endl<<"56. REM"<<endl
<<"57. REN"<<endl<<"58. RENAME"<<endl<<"59. REPLACE"<<endl<<"60. RMDIR"<<endl<<"61. ROBOCOPY"<<endl<<"62. SET"<<endl<<"63. SETLOCAL"<<endl<<"64. SC"<<endl
<<"65. SCHTASKS"<<endl<<"66. SHIFT"<<endl<<"67. SHUTDOWN"<<endl<<"68. SORT"<<endl<<"69. START"<<endl<<"70. SUBST"<<endl<<"71. SYSTEMINFO"<<endl<<"72. TASKLIST"<<endl
<<"73. TASKKILL"<<endl<<"74. TIME"<<endl<<"75. TITLE"<<endl<<"76. TREE"<<endl<<"77. VERIFY"<<endl<<"78. VOL"<<endl<<"78. XCOPY"<<endl<<"79. WMIC"<<endl;
cout<<"\nOpcion: "<<endl;
cin>>O;
system("CALL");
}
}
Valora esta pregunta


0