elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Recuerda que debes registrarte en el foro para poder participar (preguntar y responder)


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación C/C++ (Moderadores: Eternal Idol, Littlehorse, K-YreX)
| | |-+  No such file or directory como resolver
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: No such file or directory como resolver  (Leído 3,244 veces)
Arnold Herrera

Desconectado Desconectado

Mensajes: 5



Ver Perfil
No such file or directory como resolver
« en: 26 Mayo 2016, 03:19 am »


tengo este código como header el problemma es que al momento de compilarlo no me funciona me aparece "iostream no such file or directory" me gustaria e colaboraran para resolver este problema
Código
  1. #include<iostream>
  2. #include<cstdlib>
  3. #include<cstdio>
  4. #include<conio.h>
  5. #include<windows.h>
  6. #include"arista1.h"
  7. #include"cola.h"
  8. #include"pila.h"
  9.  
  10. using namespace std;
  11.  
  12. class vertice{
  13. public:
  14. vertice *sig;
  15. arista *ady;
  16. bool marc;
  17. char dato;
  18. char leer();
  19. vertice *insertar(vertice *cab);
  20. vertice *crear();
  21. bool verificar(vertice *cab);
  22. int counternodes(vertice *cab);
  23. void print(vertice *cab,arista *cab2);
  24. void *creararistaa(vertice *Cab);
  25. vertice *searchpositondata(vertice *Cab);
  26. vertice *searchpositondata4(vertice *Cab);
  27. vertice *searchpositondata2(vertice *cab,char id);
  28. vertice *searchpositondata3(vertice *cab);
  29. void grado(vertice *cab);
  30. bool recorrido(vertice *cab,arista *nuevo);
  31. void encolar(vertice *cab);
  32. };
  33.  
  34. bool vertice::verificar(vertice *cab){ //verifica que exista el grafo o en su defecto que la cabecera sa dferente de NULL
  35. bool v;
  36. if(cab==NULL){
  37. v=false;
  38. return v;
  39. }else{
  40. if(cab!=NULL){
  41. v=true;
  42. return true;
  43. }
  44. }
  45. }
  46. char vertice::leer(){ //lee el dato de un archivo
  47. char dato;
  48. gotoxy(9,23);
  49. cout<<"Por favor ingrese el dato(LETRA):";
  50. cout<<"\x10 ";
  51. cin>>dato;
  52. return dato;
  53. }
  54.  
  55.  
  56. vertice *vertice::crear(){ //crea el vertice o nodo del grafo
  57. vertice *nuevo;
  58. nuevo =new vertice;
  59. nuevo->dato=nuevo->leer();
  60. nuevo->ady=NULL;
  61. nuevo->sig=NULL;
  62. nuevo->marc=false;
  63. return nuevo;
  64. }
  65.  
  66. vertice *vertice::insertar(vertice *cab){// se comienza a dar forma a el grafo
  67. vertice *nuevo;
  68. nuevo=nuevo->crear();
  69. if(cab==NULL){
  70. cab=nuevo;
  71. gotoxy(9,24);
  72. cout<<" HA INGRESADO EXITOSAMENTE EL PRIMER NODO DEL GRAFO\n";
  73. return nuevo;
  74. }else{
  75. vertice *aux;
  76. aux=cab;
  77. while(aux->sig!=NULL){
  78. aux=aux->sig;
  79. }
  80. aux->sig=nuevo;
  81. }
  82. }
  83.  
  84. int vertice::counternodes(vertice *cab){   //contador de nodos existentes en el grafo
  85. vertice *aux;
  86. aux=cab;
  87. int c=0;
  88. while(aux!=NULL){
  89. aux=aux->sig;
  90. c++;
  91. }
  92. return c;
  93. }
  94.  
  95. void vertice::print(vertice *cab,arista *cab2){  //mostrar en pantalla del grafo en general
  96. vertice *aux;
  97. aux=cab;
  98. int c=1;
  99. arista *aux2;
  100. aux2=cab->ady;
  101. cout<<"\n GRAFO \n\n";
  102. cout<<"[Lista principal(\31)]   sublista(\32)}\n\n\n";
  103. while(aux!=NULL){
  104. cout<<c<<"["<<aux->dato<<"]\32";
  105. while(aux2!=NULL){
  106. cout<<"{"<<aux2->dato<<"|"<<aux2->peso<<"}\32";
  107. aux2=aux2->sig;
  108.  
  109. }
  110. if(aux2==NULL){
  111. cout<<"\xB0\xB1\xB2\xDB";
  112. }
  113. cout<<endl;
  114. cout<<"   \31  \n";
  115. aux=aux->sig;
  116. if(aux!=NULL){
  117. aux2=aux->ady;
  118. }
  119. if(aux==NULL){
  120. cout<<"  \xCD\xCB\xCD";
  121. }
  122. c++;
  123. }
  124. cout<<"\n\n";
  125. }
  126.  
  127. vertice *vertice::searchpositondata3(vertice *cab){
  128. vertice *aux;
  129. char id;
  130. aux=cab;
  131. cout<<"Ingrese la letra del nodo del cual desa saber el grado\n\n";
  132. gotoxy(9,26);
  133. cout<<"\x10 ";
  134. cin>>id;
  135. while(aux->sig!=NULL&&aux->dato!=id){
  136. aux=aux->sig;
  137. if(aux->dato==id){
  138. return aux;
  139. }
  140. }
  141. while(aux->dato!=id&&aux->sig==NULL){
  142. cout<<"Esta letra no existe, por favor ingrese una letra valido\n\n";
  143. gotoxy(9,29);
  144. cout<<"\x10 ";
  145. cin>>id;
  146. }
  147. return aux;
  148. }
  149.  
  150. vertice *vertice::searchpositondata(vertice *cab){
  151. vertice *aux;
  152. char id;
  153. aux=cab;
  154. cout<<"Ingrese la letra donde desea ingresar la arista\n\n";
  155. gotoxy(9,26);
  156. cout<<"\x10 ";
  157. cin>>id;
  158. while(aux->sig!=NULL&&aux->dato!=id){
  159. aux=aux->sig;
  160. if(aux->dato==id){
  161. return aux;
  162. }
  163. }
  164. while(aux->dato!=id&&aux->sig==NULL){
  165. cout<<"Esta letra no existe, por favor ingrese una letra valido\n\n";
  166. gotoxy(9,29);
  167. cout<<"\x10 ";
  168. cin>>id;
  169. }
  170. return aux;
  171. }
  172.  
  173. vertice *vertice::searchpositondata4(vertice *cab){
  174. vertice *aux;
  175. char id;
  176. aux=cab;
  177. cout<<"Ingrese la letra donde desea ingresar la arista\n\n";
  178. gotoxy(9,26);
  179. cout<<"\x10 ";
  180. cin>>id;
  181. while(aux->sig!=NULL&&aux->dato!=id){
  182. aux=aux->sig;
  183. if(aux->dato==id){
  184. return aux;
  185. }
  186. }
  187. while(aux->dato!=id&&aux->sig==NULL){
  188. cout<<"Esta letra no existe, por favor ingrese una letra valido\n\n";
  189. gotoxy(9,29);
  190. cout<<"\x10 ";
  191. cin>>id;
  192. }
  193. return aux;
  194. }
  195.  
  196. vertice *vertice::searchpositondata2(vertice *cab,char id){
  197. vertice *aux;
  198. aux=cab;
  199. while(aux->sig!=NULL&&aux->dato!=id){
  200. aux=aux->sig;
  201. if(aux->dato==id){
  202. return aux;
  203. }
  204. }
  205. int i=26,c=0;
  206. while(aux->dato!=id&&aux->sig==NULL){
  207. c++;
  208. cout<<"Esta letra no existe, por favor ingrese una letra valido\n\n";
  209. gotoxy(9,i);
  210. if(c>0){
  211. i=i+2;
  212. }
  213. cout<<"\x10 ";
  214. cin>>id;
  215. }
  216. return aux;
  217. }
  218.  
  219. void *vertice::creararistaa(vertice *Cab){  //inserta nodos al inicio de una sublista
  220. int position,c;
  221. bool v;
  222. vertice *aux,*aux3;
  223. arista  *b,*aux2,*aux4,*s;
  224. bool verifyb;
  225. gotoxy(9,25);
  226. aux=aux->searchpositondata(Cab);
  227. aux2=b->creararista(aux->ady);
  228. v=aux->recorrido(Cab,aux2);
  229. while(v==false){
  230. delete aux2;
  231. cout<<"\nESTE DATO NO EXISTE EN EL GRAFO POR FAVOR INGRESE UN DATO VALIDO\n";
  232. aux2=b->creararista(aux->ady);
  233. v=aux->recorrido(Cab,aux2);
  234. }
  235. /*aux3=aux3->searchpositondata2(Cab,aux2->dato);
  236. aux4=b->creararista2(aux->ady,aux->dato);
  237. s=aux3->ady;
  238. aux3->ady=aux4;*/
  239. aux->ady=aux2;
  240.  
  241. }
  242.  
  243. bool vertice::recorrido(vertice *cab,arista *nuevo){
  244. vertice *aux;
  245. arista *aux2;
  246. bool v=false;
  247. aux=cab;
  248. aux2=nuevo;
  249. while(aux!=NULL){
  250. if(aux->dato==aux2->dato){
  251. v=true;
  252. return v;
  253. }
  254. aux=aux->sig;
  255. }
  256. if(aux==NULL){
  257. v=false;
  258. return v;
  259. }
  260. }
  261.  
  262. void vertice:: grado(vertice *cab){
  263. vertice *aux1, *aux;
  264. arista *aux2;
  265. aux1=cab;
  266. aux=cab;
  267. char letra;
  268. int pos=0,suma=0, con=0, suma2=0, con2=0;
  269. if (cab==NULL){
  270. cout<<"--> No hay elementos por mostrar \n\n";
  271. }
  272. else{
  273. cout<<"Digite la letra del nodo a la que quiere saber su grado de entrada y de salida: \n";
  274. gotoxy(9,26);
  275. cin>>letra;    
  276. while (aux!=NULL){
  277. if(aux->dato==letra){
  278. pos=1;
  279. aux1=aux; //aux1 es el nodo de la letra      
  280. }
  281. aux=aux->sig;
  282. }
  283. if(pos==0){
  284. gotoxy(9,27);
  285. cout<<"\32NO SE ENCUENTRA EL NODO  \n";
  286. }
  287. else{
  288. gotoxy(9,27);
  289. cout<<"Nodo: "<<aux1->dato<<"\n";
  290. aux2=aux1->ady;
  291. while(aux2!=NULL){
  292. suma=suma+aux2->peso;
  293. con++;
  294. aux2=aux2->sig;
  295. }
  296. gotoxy(9,28);
  297. cout<<"Grado de salida: "<<con<<endl;
  298. gotoxy(9,29);
  299. cout<<"Suma de arcos de salida: "<<suma<<endl;
  300.  
  301. aux1=cab;
  302. while (aux1!=NULL){
  303. aux2=aux1->ady;
  304. while (aux2!=NULL){
  305. if(aux2->dato==letra){
  306. suma2=suma2+aux2->peso;
  307. con2++;
  308. }
  309. aux2=aux2->sig;
  310. }
  311. aux1=aux1->sig;
  312. }
  313. gotoxy(9,32);
  314. cout<<"Grado de entrada: "<<con2<<endl;
  315. gotoxy(9,33);
  316. cout<<"Suma de arcos de entrada: "<<suma2<<endl;
  317. }
  318. }
  319. }
  320. void vertice::encolar(vertice *cab){
  321. Nodo *cola=NULL;
  322. /* vertice *aux;
  323. int c=0;
  324. while(aux!=NULL){
  325. c++;
  326. aux=aux->sig;
  327. }
  328. char cola[2][c];
  329. for(int i = 0;i<=c;i++){
  330. cola[0][i]='N';
  331. }
  332. aux=cab;
  333. int i=0;
  334. while(aux!=NULL&&i<=c){
  335. cola[1][i]=aux->dato;
  336. i++;
  337. }
  338. for(int i = 0;i<=1;i++){
  339. for(int a = 0;a<=c;a++){
  340. cout<<cola[i][a]<<" ";
  341. }
  342. }*/
  343. vertice *aux,*aux2;
  344. arista *aux3,*aux4;
  345. aux=cab;
  346. aux4=cab->ady;
  347. aux2=aux2->searchpositondata4(cab);
  348. aux3=aux2->ady;
  349. cola=cola->encolar(cola,aux2->dato);
  350. while(aux!=NULL){
  351. while(aux4!=NULL){
  352. if(aux4->dato=aux2->dato){
  353. aux4->marc=true;
  354. }
  355. }
  356. aux=aux->sig;
  357. if(aux!=NULL){
  358. aux4=aux->ady;
  359. }
  360. }
  361. cola->eliminar(cola);
  362.  
  363. }
  364.  


En línea

AlbertoBSD
Programador y
Moderador Global
***
Desconectado Desconectado

Mensajes: 3.696


🏴 Libertad!!!!!


Ver Perfil WWW
Re: No such file or directory como resolver
« Respuesta #1 en: 26 Mayo 2016, 06:46 am »

¿Que compilador estas usando?

Y si le agregas el .h?

Saludos


En línea

Arnold Herrera

Desconectado Desconectado

Mensajes: 5



Ver Perfil
Re: No such file or directory como resolver
« Respuesta #2 en: 20 Junio 2016, 03:01 am »

Estoy  utilizando Dev c++
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
/usr/sbin/airodump-ng: No such file or directory --aircrack
Wireless en Linux
r1ckard0 2 4,095 Último mensaje 16 Diciembre 2010, 17:49 pm
por MENDO Corp
instalando sip-4.13 asm/errno.h: No such file or directory
GNU/Linux
Leyer 1 2,650 Último mensaje 2 Marzo 2014, 17:22 pm
por insallah
¿Errores al usar OPENCV, No such file or directory?
Programación C/C++
ApOkAlizE 4 3,209 Último mensaje 20 Octubre 2012, 01:04 am
por avesudra
No such file or directory
Programación General
insallah 1 1,814 Último mensaje 9 Marzo 2014, 14:18 pm
por insallah
Dev-c++: error: iostream: No such file or directory
Programación C/C++
HardForo 1 3,591 Último mensaje 15 Abril 2016, 19:58 pm
por HardForo
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines