#include <iostream>
//#include <cstdlib>
//#include <stdio.h>
#include <string>
usingnamespace std;
int main()
{
constint SIZE = 5 ;
int score[SIZE] = {0} ;
std::string name[SIZE] ;
//for(i=1 ; i<= size; i++) // *** this is wrong
// the first element of the array is at position 0
// and the last at element is at position (SIZE-1)
// so we iterator over positions from 0 up to (but not incluyding) SIZE
for( int i = 0 ; i < SIZE ; ++i )
{
std::cout << "\n Enter the student name : ";
std::getline( std::cin, name[i] ) ;
std::cout << "\n Enter the student score : ";
std::cin >> score[i] ;
std::cin.ignore( 80, '\n' ) ; // empty the input buffer
}
}