• entries
570
2427
• views
216937

# Untitled

106 views

lolol, so I mentioned earlier that I was somewhat disappointed with my Data Structures class, which is like a "Java Programmer's Introduction to C++" which I have to take, despite already knowing C++. So I figured I'd take notes on everything that was said in class which I thought was funny or otherwise wrong, then look up stuff later to see if I was right.

One of the things on my list was something she wrote while answering a student's question about the differences between pointers and references -

int* x;
int& y;

And how the only difference between the two is the method of dereferencing. Now, that isn't quite the only difference, but references are evil and I don't care. But I did ask her "Is the declaration of y legal C++?" to which she replied yes. She then pointed out that -

void swap( const int& r, const int& l );

was also a legal declaration of a reference. I tried to mention something about having to set the reference to something initially, then gave up.

Anyway, so I'm going to write a letter and send it via anonymous feedback to her, just for my own personal kicks. Pouya said that he once did something similar and no one cared, but meh. I figure I'll sign it "-Mushu" too so, if she really wanted to she could contact me and tell me to bugger off or something.

lolol.

1>.\main.cpp(9) : error C2530: 'y' : references must be initialized

[rolleyes]

I kind of did, but I didn't feel like entertaining an argument in a beginning C++ class over some obscure thing like references. That was the one thing I did openly complain about though, the rest of the stuff I just griped about in the letter.

*shrug*

Stupid moocows.

My instructor tried to tell me that you can't use switch() on a char.

Follow-up: She sent out a class email which re-covered everything I mentioned. Yay :D

## Create an account

Register a new account