Last time, I said ::
int sort[] = { [10, 2, 8, 4, 6, 0] }; // elegiac pointed out that arrays need curly braces, I like square. So I combined them.
And I was wrong. I got a compile error that disappeared as soon as I removed my beloved square braces.
int sort[] = {10, 2, 8, 4, 6, 0};
works out just fine.
My main loop that moves things around seems to be working fine, I’m just only getting that single pass. I’m trying to work out how to get a while to work for me, but for now… I’m happy with my single pass.
One thing elegiac had asked me was about the std::endl; that I had tacked into the program at the very end. Testing it out showed me that it didn’t seem to make any difference at all whether I left it in or took it out.
At this point I am wondering if it makes more sense to keep thrashing at this or to look at my code samples and see how others have done this. I’m certainly gaining a better understanding of how C++ feels doing it this way, but I think that the templating nonsense is still so far out of reach that I am not going to be able to thrash myself to an understanding of it. I am going to need help.
I hate asking for help.