Advertisement
plantbae

Apuntador de estructuras a función

Feb 16th, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.70 KB | None | 0 0
  1. #include <iostream>
  2. #define ELEMENTOS 5;
  3. using namespace std;
  4.  
  5.  
  6. struct datos_estudiante
  7. {
  8.     char nombre[20];
  9.     float nota1, nota2, nota3;
  10.     float nota_parcial;
  11.     int codigo;
  12. };
  13. struct datos_estudiante  *datos[10];
  14.  
  15. struct notas_estudiante
  16. {
  17.  
  18. };
  19. struct estudiante notas[10];
  20. int tomar_datos(struct datos_estudiante *arg_datos)
  21. {
  22.     cout << "codigo : " << endl;
  23.     cin >> arg_datos->codigo;
  24.     cout << "nombre : " << endl;
  25.     cin >> arg_datos->nombre;
  26.  
  27.    
  28. }
  29. void main(){
  30.     tomar_datos(*datos);
  31.  
  32.     /*
  33.     cout << "nota 1 : " << endl;
  34.     cin >> ptrn->nota1;
  35.     cout << "nota 2 : " << endl;
  36.     cin >> ptrn->nota2;
  37.     cout << "nota 3 : " << endl;
  38.     cin >> ptrn->nota3;
  39.     ptrn = notas;
  40.     */
  41.     system("pause>null");
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement