摘要:
Code That Writes Code 6.1 Coding your way to the weekend 6.2 Kernel#eval, Binding#eval Binding: Objects of class Binding(类Binding的对象) encapsulate (密封) 阅读全文
摘要:
在本章我遇到了c语言的struct数据,即自定义的数据结构。比如: struct edge { int u; int v; int w; }; 题目给了一组数据,用edge储存。需要按照w大小排序。我开始不知道如何用ruby实现,后来想到之前的题目也遇到过(小猫钓鱼)。我定义了一个类,在类中储存了数 阅读全文