Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- contract Student{
- struct stu{
- string name;
- uint age;
- bool tookTest;
- }
- mapping(uint => stu) public studentNames;
- function addStudent (uint ID, string _name, uint _age) {
- studentNames[ID] = stu(_name, _age, false);
- }
- function updateStudent (uint ID) {
- studentNames[ID].tookTest = true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement