My final value is not consistent.

My final value is not consistent.
Last edited on
GCC wrote:
test.cpp:174:16: warning: iteration 50 invokes undefined behavior [-Waggressive-loop-optimizations]
 if (valueof50[i] >= highestvalueof50){
     ~~~~~~~~~~~^
test.cpp:173:16: note: within this loop
 for (int i=0; i<100; i++) {
               ~^~~~
Hello Hezyln,


PLEASE ALWAYS USE CODE TAGS (the <> formatting button), to the right of this box, when posting code.

Along with the proper indenting it makes it easier to read your code and also easier to respond to your post.

http://www.cplusplus.com/articles/jEywvCM9/
http://www.cplusplus.com/articles/z13hAqkS/

Hint: You can edit your post, highlight your code and press the <> formatting button.
You can use the preview button at the bottom to see how it looks.

I found the second link to be the most help.



It looks like Peter87 has loaded and compiled you code. Not only did it make it easier to read he found that it generated errors.

It is always a good idea to compile you code before you post it. This way if you receive any errors that you do not understand you can ask about them.

As Peter87 has demonstrated it is best to post the whole error message. Some parts of the error message will mean more to others than it does to you.

Hope that helps,

Andy
Topic archived. No new replies allowed.