« Oh, Snap! | Main | This One's for Bo » [pP]>kof 2002 para baixar gratis
November 18, 2006
Fuck You, C++
At the moment, lines 70-73 of my Netflix code look like this:[pP]>kof 2002 para baixar gratis
while(true){
numcls = (rand()%40)+10;
cout << "Number of clusters: " << numcls << endl;
kmeans(numcls, usercount, (maxmov-minmov)+1);
}
If I compile and run my code, I get a segmentation fault in a method called at line 60. However, if I comment out the while loop at line 70 -- so that K-Means runs, but only once -- everything works fine and a I actually get decent results. [pP]>kof 2002 para baixar gratis
This would never happen in a real programming language.[pP]>kof 2002 para baixar gratis
(By 'this' I mean both the inexplicable crashing and the good results -- the code would be too slow to get any results.)[pP]>kof 2002 para baixar gratis
Posted by todd at November 18, 2006 10:16 AM[pP]>kof 2002 para baixar gratis
Comments
Update: Apparently, I can also just change the while(true) loop to a for(int i=0; i>-1;) loop, and that segfault is avoided. Fucking ridiculous.[pP]>kof 2002 para baixar gratis
Posted by: todd. at November 18, 2006 10:22 AM[pP]>kof 2002 para baixar gratis
Post a comment
Thanks for signing in, . Now you can comment. (sign out)[pP]>kof 2002 para baixar gratis (If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)