This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

good code bad answer

my code is 110% correct; eg no errors and runs properly. see.

int _val;

int myfunc2(int val)
{
  _val = val;
   return _val;
};

int Bar(int val)
{
  return _val + val + 1;
};

void myfunc1(int val)
{
  _val += Bar(val);
};

etc
etc
etc

it doesnt give me the right answer sometime.

HEEEEEEEELLLLLLLPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP

Parents
  • 2) the only reason it worked is that the cpu was NOT functioning as it should per the datasheet.

    Interesting how you assume to know whether or not my CPU here was functioning acccording to its data sheet. Particularly since you certainly don't have the slightest which CPU that might even was.

    that contradicts the notion

    The "that" you're referring is pure speculation on your part, so there's no way it can contradict anything.

Reply
  • 2) the only reason it worked is that the cpu was NOT functioning as it should per the datasheet.

    Interesting how you assume to know whether or not my CPU here was functioning acccording to its data sheet. Particularly since you certainly don't have the slightest which CPU that might even was.

    that contradicts the notion

    The "that" you're referring is pure speculation on your part, so there's no way it can contradict anything.

Children
No data