Untitled

Published August 28, 2006
Advertisement
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.
Previous Entry Untitled
Next Entry Untitled
0 likes 5 comments

Comments

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


[rolleyes]
August 28, 2006 11:45 AM
DukeAtreides076
You didn't shout your head off about how you can't reassign a reference?
August 28, 2006 12:32 PM
Mushu
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*
August 28, 2006 12:35 PM
Programmer16
Stupid moocows.

My instructor tried to tell me that you can't use switch() on a char.
August 28, 2006 03:00 PM
Mushu
Follow-up: She sent out a class email which re-covered everything I mentioned. Yay :D
August 28, 2006 07:56 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Untitled

5420 views

Untitled

1056 views

Untitled

1202 views

Untitled

1114 views

Untitled

1160 views

Untitled

1446 views

Untitled

1113 views

Untitled

1014 views

Untitled

1019 views

Untitled

1199 views
Advertisement