Guest User

Untitled

a guest
Aug 7th, 2015
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. So you can both load and store the database without knowing a single thing about the data inside.
  2.  
  3. Once you want to actually access it, you can index like so:
  4.  
  5. db["label"]
  6.  
  7. Such that you can also:
  8.  
  9. db["label"].print();
  10.  
  11. To print only that node of the database.
  12.  
  13. This is simple abstraction and modularity that makes the code far more simple and reliable. Write once, use everywhere.
  14.  
  15. The nice structure of the data is an added benefit. You may prefer the formatting you get with simple scanf, but of course you admit it has its drawbacks. If you make a mistake it'll input incorrectly and possibly even crash.
  16.  
  17. There is of course good reason c was designed the way it was. We can take c, then strip some of the more annoying features like type { ... } name; to eliminate the need for }; and replace it with simply }.
Advertisement
Add Comment
Please, Sign In to add comment