You could alpha sort in groups starting with strings with length 1, then do length 2 and so forth.
outer_space
@outer_space
Best posts made by outer_space
Latest posts made by outer_space
-
RE: ORDER BY value, not place
-
RE: Javascript calculation
Ive been programming micros in assembly for years. Ive never
encountered floating point numbers. Always when I need decimal
precision I find a way to represent it using ints. Now that I
know how floats work I think theyre bs. If only C++ did it the
way I do it in assembly, the top 3 threads here wouldn't be complaining
about decimal numbers not comparing properly. Im a beginner at
C++ so correct me if theres already this decimal datatype Im talking
about. -
RE: Inexplicable problem in a very simple piece of code
Im retarded. I hope someone makes % work on floats when C+++ comes out.
It doesnt matter anymore, I found out about ostream and you can format floats to string that way instead. -
Inexplicable problem in a very simple piece of code
I'm learning about mod and how % doesnt work on floats. That lead
me to #include <cmath> which has the fmod function. I wrote
a short program to test the function but I do not see expected result.
A program consisting of this line was used to show the remainder of 122.07/1. I expect to see 0.07 as the answer.
cout << "fmod((float) 122.07, (float) 1) = " << fmod((float) 122.07, (float) 1) << endl;
Instead, this is the output:
fmod((float) 122.07, (float) 1) = 0.0699997
wtf?