tengo un error
//el programa debe insertar eliminar y mostrar y aparte de llevar el menu
1.#include <iostream>
2.#include<stdlib.h>
3.using namespace std;
4. struct nodo{
5. int a;
6. struct nodo *sig;
7.
8. }; struct nodo sig,nuevo,cabecera;
9. int main()
10. {
11. struct nodo *sig;
12. struct nodo *nuevo;
13. struct nodo *cabecera;
14. int i=1;
15. int cant;
16. int a;
17. int opcion;
18. int dato;
19. cabecera=NULL;
20. cout<<"cantidad de nodo";
21. cin>>cant;
22. while(i<=cant){
23. nuevo=(struct nodo*)malloc(sizeof(struct nodo));
24. nuevo->sig=cabecera;
25. //insertar
26. cout<<"ingresa dato";
27. cin>>dato;
28. nuevo->a=dato;
29. cabecera=nuevo;
30. i++;
31. system("cls");
32. while(nuevo!=NULL){
33. cout<<"dato"<<nuevo->a<<endl; //mostrar
34. nuevo}
35. int main()
36. {
37. int opcion;
38. int salir;
39. cout<<"ingrese una opcion";
40. cin>>opcion;
41. cout<<"ingresar dato";
42. cout<<"ingresar cantidad";
43. cout<<"salir";
44. switch(opcion)
45. for(;opcion!=3);=nuevo->sig;
46. {
47. case 1:
48. system ("cls")
49. cout<<"ingresar una opcion 1.ingresar dato";
50. cout<<"ingresar dato";
51. cin>>dato;
52. break;
53. case 2:
54. system ("cls");
55. cout<<"ingresa la opcion 2. ingresar cantidad";
56. cout<<"ingresar cantidad";
57. cin>>cant;
58. break;
59. case 3:
60. system ("cls");
61. cout<<"ingrese la opcion 3. salir";
62. cout<<"salir";
63. cin>>salir;
64. break;
65. }
66. }
67.
68. system("pause");
69.}
70.
71. return 0;
72.}