The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

corwin17's c++ corner: 03/27 operator overloading by corwin172014-03-27 10:45:15
  operator overloading by lenmear2014-03-27 11:05:43
    I think I understand, but by corwin172014-03-27 11:49:10
      Use the accessors by lenmear2014-03-27 12:00:32
        Danger, Will Robinson! by lenmear 2014-03-27 12:27:00
A bug in the matrix class from your first post just occurred to me and if you're not familiar with it, it could cause you a bunch of grief at runtime. The matrix class makes a shallow copy of the matrix data. This creates the potential for corrupting the matrix which results from your operator+. Are you familiar with shallow vs deep copying? (I don't know how prevalent that is in C, or if you've already read about it in your C++ studies.)

Huh... reading the class again, I just found another bug, a memory leak. Uncomment the matrix destructor, if you haven't already done so.
[ Reply ]
          And people wonder why I refuse to learn OOP. by firehawk2014-03-27 12:38:20
            And why I've refused until thrust upon me! (n/t) by corwin172014-03-27 12:42:35
            OOP isn't that bad, it's the unmanaged langauges by Freakazoid2014-03-27 12:47:50
              I use PHP, and I've seen PHP OOP... by firehawk2014-03-27 12:53:53
          <Deleted><Deleted>2014-03-27 22:45:15
            Whoa! Mods! B-Usted Horizontal Scroll! by wwill2014-03-27 22:25:19

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)