Thanks for the shortening of the expression; that helps.
I was curious if someone screamed "no, you should use..."; hence my question.
I noted there was a transform instruction available and, though this did not appear to return greater efficiency through examples I could see online, I did wonder if it would offer neater code (though, I am currently less interested in that - I just want it to work right now). :)
Anyway, thank you for the reply; very much appreciated.
at is notably slower than , if no one said. Avoid it unless you can't.
apart from that there is not really anything that will make this code more efficient in terms of execution speed.
there are various things you can do to change how the code looks, such as a range based for loop.
Valarrays are slick but seldom used; they may confuse people that do not use them regularly -- they have some syntax that is unlike everything else in the c++ universe.
doubles are preferred unless you have a reason to use floats.
Thank you lastchance; I will do so immediately. That will make my code far easier to run through.
Yes, Jonnin, I had used the at() because, like a numpty, I had tried to reference the vector element using rounded brackets and the system complained. Even though I had previously realised they needed to be square ones, I proceeded to use the at() statement until Ganado pointed it out to me. All removed now. :)