you want compare function to actually compare your specific data type.
memcmp function compares only bites of two pointers, but imagine if you have struct with char* type variable.
by comparing struct bytes, you compare address of char*, but you actually want to compare value stored by char*, so you need a function that does specific comparison to you.
@autonify You should re-watch the previous lecture. The cmpfn allows lsearch to be as generic as possible. Without it we have to use memcmp, which does a byte-sized comparison between two values. This works in some situations but we can run into problems when comparing character pointers, C-strings, etc, i.e. when we are not directly comparing memory patterns.
i followed his advice at the end of the video and moved into a new house twice the size of my old one, moved all my stuff over, and then i demolished my old house but it didn't sell for much money so he gave me bad advice.
He's a good teacher. The only issue I have is how he says "star" and "ampersand" when what he means is "pointer" and "address of ". Not too bad though.
Great lecture. But isn't it funny how these academic eggheads can become experts in C++ but they can't figure out how to record audio without it distorting. Alas, a common problem with many lectures I've seen online. It isn't difficult guys - just check those levels before you start recording, or at least use a decent mic.
Ribery is a good footballer, and Jerry Cain is a great lecturer in stanford uni ( Probable invented many things too ). I cant even get in there because of my GPA. Its meant as a compliment and to be honest i wud take brains & talent
Comment removed
jamebozo 2 weeks ago
This has been flagged as spam show
I forgot using Java.
grunder20 1 month ago
This has been flagged as spam show
complex structures
grunder20 2 months ago
is anybody studying in Stanford or US University ? Please PM I need to ask you some questions !
so2murad 2 months ago
@so2murad I study CS in MSU.
btsmarco 2 months ago
These are the int boards.
RandomNinjaOfEvil 2 months ago in playlist Course | Programming Paradigms
prof. Jerry "Does That Make Sense To People" Chain - the best professor that i've ever seen...
TheRussificator 3 months ago
Professor: Does That Makes Sense?
Troll Student: Hell No!
Thumbs? :)
KenmoreTownKillaz 4 months ago
why the unusual complication in simple things ??
abhispicy 6 months ago
I want a handout, damn it!
0000001100000 8 months ago
I can't understand why do we have to pass cmp function as 5th element
(an argument ) to lsearch function.
autonify 9 months ago
@autonify
you want compare function to actually compare your specific data type.
memcmp function compares only bites of two pointers, but imagine if you have struct with char* type variable.
by comparing struct bytes, you compare address of char*, but you actually want to compare value stored by char*, so you need a function that does specific comparison to you.
Does that make sense to people?
p.s. you gotta love that phrase :D
frailas 8 months ago in playlist Course | Programming Paradigms
@frailas
Thankyou for your responce, I understand it now.
autonify 8 months ago
@autonify You should re-watch the previous lecture. The cmpfn allows lsearch to be as generic as possible. Without it we have to use memcmp, which does a byte-sized comparison between two values. This works in some situations but we can run into problems when comparing character pointers, C-strings, etc, i.e. when we are not directly comparing memory patterns.
eatme690808 8 months ago
@eatme690808
Thankyou for the tip.
autonify 8 months ago
Great lectures, but what's with the odd, um, throat noises Cain keeps making...only a little distracting.
bluetoothEnabled 10 months ago
Comment removed
silverpizza100 1 year ago
i followed his advice at the end of the video and moved into a new house twice the size of my old one, moved all my stuff over, and then i demolished my old house but it didn't sell for much money so he gave me bad advice.
emptycorp 1 year ago
He does know that F# == Gb, right?
IceArdor 1 year ago 4
This professor his his class so quite ..
JesusMiddleEastGuy 1 year ago
Is there a way to get the assignments?
lac0nix 1 year ago
Are there no projectors at Stanford?
airyman 1 year ago
@airyman
was thinking the same thing, must
FlightSimXtreme 1 year ago
He's a good teacher. The only issue I have is how he says "star" and "ampersand" when what he means is "pointer" and "address of ". Not too bad though.
Piscivorus 2 years ago 2
very good POINT (i had to)
scooped13 1 year ago
God bless him for not having indian accent... in vogue lately at Standford and MIT...!!!
frankfurt28 2 years ago 3
Is he in shorts? :D
Anyway...great lectures, great professor.
"Does that make sense to people?"
"Yeah...sure....aaaa"
:D
moveaxebx 2 years ago
haha.. I love that quote
"There's nothing modern about C, so don't adapt any modern conventions of C.."
guitarfox 2 years ago 15
Great lecture. But isn't it funny how these academic eggheads can become experts in C++ but they can't figure out how to record audio without it distorting. Alas, a common problem with many lectures I've seen online. It isn't difficult guys - just check those levels before you start recording, or at least use a decent mic.
NameNotaNumber 2 years ago
lol so true
Intosia 2 years ago 2
He looks like Ribery the french footballer( soccer player)
sijojames18 2 years ago 2
Damn, that's harsh.
MajDigi 2 years ago
Ribery is a good footballer, and Jerry Cain is a great lecturer in stanford uni ( Probable invented many things too ). I cant even get in there because of my GPA. Its meant as a compliment and to be honest i wud take brains & talent
(Hard work can get u that :) ) any day for looks
sijojames18 2 years ago
this guy is awesome.
antirealm 2 years ago 5
if it is the case that found == null then... you're sad... otherwise... hmm... you're happy.. mmkay? Does that make sense to people?
Gotta love that!
marsrendezvous 3 years ago 43
I can't find the sad and happy faces on my keyboard :(
NameNotaNumber 2 years ago 4
@marsrendezvous it makes sence to me. He has humor. but he just used a hypothetical at the end, IDT he ment it.
silverpizza100 1 year ago