@ronalchn You poor sod! I fought for a year to have a FORTRAN/COBOL course replaced by a C++ one. Got a bunch of professors on my side and in the end prevailed. Unfortunately, the guy who taught the course knew less of C++ than I did at the time, and I knew very little.
Solid reasoning. No there is no way to justify MFC in class (except maybe for hacking on an existing practicum that happened to still use it). There is no intrinsic science or knowledge to MFC IMO
@ronalchn That's not a problem. Your university's task is not to teach you the tools you'll need when you get your first job. Everything will be outdated by the time you graduate. It's task is to teach you basic knowledge in your field, and techniques for teaching yourself how to use the tools needed at any given time.
However, I fail to see how MFC provides anything in that regard.
`static const T* NullPtr = 0;` gives `Error 1 error C2864: 'CTree<T>::NullPtr' : only static const integral data members can be initialized within a class` no sh*t, sherlock -.-
> "People will try to sucker you into the 'source control' nonsense," Gary said, "but it's totally stupid. Come on, haven't these people heard of backup?"
@R.MartinhoFernandes thanks robot, I owe you beer for that one. (10/10 for one of the worst looking codez I've ever wrote. hopefully he won't understand it enough to pick on that)
@ronalchn If he's gonna comment on my code style, I'll ask if he did correct mistakes in the exam he gave us recently (my comments took half of the back side)
Say we have some external linkage using the extern keyword.
I have (in class1.cpp):
MyClass* myClassVar = NULL;
The constructor initializes the above, and destructor deletes.
Then in class2.cpp and class3.cpp there is:
extern MyClass* myClassVar;
These classes use myClassVar (doing the us...
@R.MartinhoFernandes Nah. Not really. It was junk. It kept cropping up in the recommends: youtube.com/watch?v=vqwzA67f8jY I bet everyone has seen it in the recommends. One of them vids that YT pushes, I guess.
@ronalchn Sure :) Admit it, you also get these vids listed. It is how everyone reaches the point where he exclaims "I'm in that corner of youtube again"
Youtube and google tailor results based on what you watch/search for. So logically, you should only watch/search for things that won't drive you crazy in 20 years time.
o my god,really i will try to solve,it is difficult question because k-d tree is not simple structure ,i understood,i am tired already,so go and try to do myself,i dont have any hope to get help from here,not you,i dont meant you,but others,they call themself experts and can't udnerstand anything,everyone makes mistake,you could help him in case of consider yourself expert — dato4 mins ago
@sehe I wasn't even at my desk. However, the guys I share this office with (one more months), didn't call me, nor do they look annoyed, so I seem to have turned the volume low enough.
there doesn't seem to be any ordering amongst these integers, so I'll assume by this that the biggest difference between any two numbers is going to be 0, 2, or 3
here is my version of code for median selection
#include<iostream>
using namespace std;
#define max 1000
int a[max];
int n;//number of elements
void Swap(int i,int j)
{
int k=a[i];
a[i]=a[j];
a[j]=k;
}
int randint(int l, int u)
{ return l + (RAND_MAX*rand() + rand()) % (u-l...