Azure Jane Lunatic (azurelunatic) wrote,
Azure Jane Lunatic

  • Mood:

All your C++ are belong to ME, dammit! ME!!!

Helped a EET out in lab the other day. He was trying to program a program in C++ that would output various properties of a resistor if you entered things in. He was getting 38 errors or so every time he tried to compile. Adam was helping him. Adam got him down to 8 errors, but the 8 errors all looked to be the type that you're going to have to make more errors before you make less errors.

Keep in mind, I knew what I was doing on this problem already because I'd already helped another EET student downstairs with the same bit of code, only that guy knew mostly what he was doing.

This guy was worse than clueless, and had Adam helping him out. Baby programmer that I am, I barged right up and acted officious.

The first thing that I spotted was that he'd defined the data type Resistor. Cool. I looked to see why it was coughing up errors.

I believe the line of code I found looked something like:

int res R[10];

....Hello? .... I asked him why he'd put it like that in his code, and explained how one properly plays with user-defined data types. "I had it like that because he said so," the guy said, indicating Adam, who was trying to look busy on the other side of the lab.

I marched off, found Adam, explained the error of his ways to him, brought him back to the computer of his hapless classmate, and smacked him around publicly.

There are just some things you shouldn't make the compiler try to eat.
Comments for this post were disabled by the author