I am not sure how to return a struct that is inside an array of structs. This is my code:
contract StudentsInfoTracker{
Student[] students;
struct Student{
string name;
address ethAddress;
uint numberInClass;
uint[] marks;
}
function getStudent(uint) public view returns(string memory name, address ethAddress, uint numberInClass, uint[] memory marks){
return(students[uint].name, students[uint].ethAddress, students[uint].numberInClass, students[uint].marks);
}
I need to return the student given the uint index. I know I can't return a complete struct but I can try to retrieve its data. Anyway I get this error:
TypeError: Type type(uint256) is not implicitly convertible to expected type uint256.