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

 

 


Tema destacado: AIO elhacker.NET 2021 Compilación herramientas análisis y desinfección malware


  Mostrar Mensajes
Páginas: [1] 2
1  Programación / Programación C/C++ / Re: C++ vector por parametro. en: 10 Octubre 2011, 23:03 pm
Gracias. :)
2  Programación / Programación C/C++ / Re: C++ vector por parametro. en: 10 Octubre 2011, 23:00 pm
amigo me falta poner los corchetes....
Código
  1. #include <cstdlib>
  2. #include <iostream>
  3.  
  4. int leer(int v[],int tam);
  5.  
  6. using namespace std;
  7. int main(int argc, char *argv[])
  8. {
  9.    int v[50],n;    
  10.    cout<<"Ingresar Tamaño del Vector"<<endl;
  11.    cin>>n;    
  12.    leer(v,n);    
  13.    system("PAUSE");
  14.    return EXIT_SUCCESS;
  15. }
  16. int leer(int v[],int tam)
  17. {      
  18.     for (int i=0;i<tam;i++)
  19.     {   cout<<"ingrese Dato ";                
  20.         cin>>v[i];
  21.     }
  22.  
  23. }


y ahora si me compila perfecto.
3  Programación / Programación C/C++ / Re: C++ vector por parametro. en: 10 Octubre 2011, 22:49 pm
ggracias por esas correciones pero aun no  me compila por completo mira :(

Código
  1. #include <cstdlib>
  2. #include <iostream>
  3. void leer(int v,int tam);
  4.  
  5. using namespace std;
  6. int main(int argc, char *argv[])
  7. {
  8.    int v[50],n;
  9.  
  10.    cout<<"Ingresar Tamaño del Vector"<<endl;
  11.    cin>>n;    
  12.    leer(v,n);    
  13.    system("PAUSE");
  14.    return EXIT_SUCCESS;
  15. }
  16. void leer(int v,int tam)
  17. {
  18.     int i;      
  19.     for (i=0;i<tam;i++)
  20.     {                    
  21.         cin>>v[i];
  22.     }
  23.  
  24. }
  25.  
4  Programación / Programación C/C++ / C++ vector por parametro. en: 10 Octubre 2011, 22:29 pm

hola buenas tardes.  NO COMPRENDO PORQUE no compila :( ... obs. no me sale ningun error. gracias POR SU AYUDA.

Código
  1. #include <cstdlib>
  2. #include <iostream>
  3. void leer(int v,int tam);
  4. using namespace std;
  5. int main(int argc, char *argv[])
  6. {
  7.    int v[50],n;
  8.  
  9.    cout<<"Ingresar Tamaño del Vector"<<endl;
  10.    cin>>n;    
  11.    leer(v[50],n);    
  12.    system("PAUSE");
  13.    return EXIT_SUCCESS;
  14. }
  15. void leer(int v[50],int tam)
  16. {
  17.     int i;    
  18.     for (i=0;i<tam;i++)
  19.     {
  20.         cout<<"ingresar dato : "<<endl;
  21.         cin>>v[i];
  22.     }
  23.  
  24. }
  25.  
5  Programación / Programación C/C++ / Re: Archivos, Registros en c/c++ en: 14 Junio 2011, 16:11 pm
gracias!
6  Programación / Programación C/C++ / Re: c++ Funciones por referencia en: 11 Junio 2011, 06:18 am
gracias ... MUCHAS gracias.
7  Programación / Programación C/C++ / c++ Funciones por referencia en: 11 Junio 2011, 02:54 am
Hola disculpe no se porque no compila¿?
ayuda!
Código
  1. #include <cstdlib>
  2. #include <iostream>
  3. #define max 300
  4. using namespace std;
  5. void llenar(int &a);
  6. void leer(int a,int b,int c);
  7. int main(int argc, char *argv[])
  8. {  
  9.    int num[max],i,x,y,h;
  10.  
  11.    llenar(num);
  12.    leer(x,y,h);
  13.  
  14.    system("PAUSE");
  15.    return EXIT_SUCCESS;
  16. }
  17.  
  18. void leer(int a,int b,int c)
  19. {
  20.     cout<<"Ingrese el valor X ...(0.x)"<<endl;
  21.     cin>>a;
  22.     cout<<"Ingrese el valor Y ...(0.y)"<<endl;
  23.     cin>>b;
  24.     cout<<"Ingrese el valor Z ...(0.z)"<<endl;
  25.     cin>>c;
  26.  
  27. }
  28. void llenar(int &a)
  29. {    
  30.     int i;
  31.          for(i=0;i<max;i++)
  32.          {
  33.               a[i]=0;    
  34.          }
  35. }
8  Programación / Programación C/C++ / Re: Archivos, Registros en c/c++ en: 9 Junio 2011, 05:52 am
Un Buen Tutoria de Archivos... desde cero hasta lo mas avanzado. con ejemplos les agradeceria mucho ¡GRACIAS.!
9  Programación / Programación C/C++ / Archivos, Registros en c/c++ en: 9 Junio 2011, 05:43 am
Buenas noches quisiera que me faciliten ejemplo de ARchivos y registros en c/c++  ...ejercicios resueltas MUCHAS GRACIAS.
10  Programación / Programación C/C++ / Re: FUNCIONES Y PROCEDIMIENTO en: 28 Abril 2011, 20:16 pm
TENIAS MUCHA RAZON. GRACIAS , UN ABRAZO A LA DISTANCIO. QUE CHEVERE COMPILO
Páginas: [1] 2
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines