- 0
By +Red King,
By sweetlife,
By adrynalyne · Posted
By Son_Of_Dad · Posted
By Slugsie · Posted
By Nick H. · Posted
We rely on ads to keep creating quality content for you to enjoy for free.
Please support our site by disabling your ad blocker.
Continue without supporting us
If the prompt is still appearing, please disable any tools or services you are using that block internet ads (e.g. DNS Servers, tracking protection or privacy extensions).
Question
revanmj
Hi, I have to implement an NBC (for finding clusters in the provided set of data) algorithm at my class project with a friend. We came across very strange issue. There are few helper functions, and the one with a problem is kNN (possibly kEN too) in the kNB.h file. After passing arguments to it from the main function of the program (for example k=3 and p=5), it goes to the kNN function and starts changing values of k and p randomly, even though function code is not supposed to do that anywhere as you can see below.
Also, while using debugging mode and going through this function step by step I noticed that it sometimes comes back before the first while which I think shouldn't happen. I guess it may be some trivial mistake, but I'm not very good at C++ (unfortunately we were ordered to use it). You can download entire Visual Studio 2013 solution from here: https://dl.dropboxusercontent.com/u/1561186/EDAMI.rar. So, does anyone have any idea why described situation is happening?
Link to comment
https://www.neowin.net/forum/topic/1216491-values-of-the-function-parameters-are-changing-randomly-but-theyre-not-modified-from-the-code/Share on other sites
5 answers to this question
Recommended Posts