Search:
Type: Posts; User: zizz
Search:
Search took 0.02 seconds.
-
You're wellcome.
I served the professional approach to your problem on a silver plate and I hope you have a look at it.
-
I hate reading other people's code so I just tell you how I would solve this.
I would introduce an alternative representation of a number, lets call it a Digit Frequency Table, a DFT.
A DFT...
-
As has been said the question could be clearer.
But say the posted square-root expression describes F(n) recursively and that the stop criterion is when n reaches 0 that is the function stops at...
-
Well what was the insult? By editing my post no one can tell.
Moderators shouldn't change replies of others at the very least not in discusions where they participate themselves. Censorship is a...
-
My comprehension is that any 64-bit bitpattern is a valid double really.
But the OP wanted to know if a certain bitpattern counted as a valid "number" and in that case the tests I suggested would...
-
How is that? What's dangling? _listRef is initialized to an empty QList or am I mistaken?
-
Well if you mean that an object preferably shouldn't return stuff (be it by pointer or smart pointer or value or whatever) but instead be asked to do things then I agree.
-
Yours seems to be quite a common problem because Microsoft even has a resource center dedicated to upgrading legacy VB6 code. There are some tools available to ease the pain. Some are free, at least...
-
You could check that the 8 bytes (held in a double) is neither std::subnormal, std::infinite nor std::NaN.
Then it should represent some number in the "numeric" range.
-
You could add a default constructor where _listRef is initialized with an empty QList like,
class Device {
public:
Device() : _listRef(QList<QSharedPointer<Data>>()) {}
explicit...
-
On the contrary, at least if you're using the OO paradigm to programming, the best solution is when all polymorphic (OO) objects are handled by smart pointer everywhere and all the time.
-
To me it looks like your "dilemma" is self-inflicted. You're complicating things.
Just design like you would in C# or Java with the additional "burden" in C++ that for each introduced OO type you...
-
You mean it's a contradiction in terms? One cannot be a die-hard Win32 programmer and a WTL user at the the same time?
Apart from sounding like a die-hard xxxx I think you're dead wrong. WTL is...
-
Although I'm using WTL myself I would describe it as obscure and clandestine. It's mostly for old school die hard Win32 developers who are only comfortable close to the metal. I was about to say that...
-
Googling is fine but there's a very good reference book about the C++ standard library (including the STL containers) available. It's called The C++ Standard Library, 2nd edition, by Josuttis.
-
No, std::map is based on a tree and thus has O(logN) accesses. This is true for all so called associative containers.
The way to go is std::unordered_map. It's based on a hash table and has O(1)...
-
A good strategy could be to switch to a portable GUI.
Have a look at primarily wxWidgets but also Qt.
http://www.wxwidgets.org/
-
It seems Boost offers a topological sort algorithm,
http://www.boost.org/doc/libs/1_55_0/libs/graph/doc/topological_sort.html
-
If the file fits in memory you can read it into an array, sort it using the algorithm that comes with your language's standard library, and then write it back again.
The Java documentation offers...
-
You can start by writing a program that can do that for one array. When that works you expand the program to handle several arrays.
If you can check whether a position is zero in one array it's...
-
The most famous parsing algorithm specifically for math expression parsing is the Shunting-yard algorithm by Dijkstra,
http://en.wikipedia.org/wiki/Shunting-yard_algorithm
-
What's so horrible about having to specify the signature of the function you override in the derived class?
If you want to minimize the typing you can even put the implementation directly in the...
-
I assume TILL, TRILL and BRILLIANT are in the dictionary and they're selected because they can be composed from the letters of LARBITNLI. Lets call this property composability.
It's especially...
-
I'm no stranger to optimization. This is a good link by the way,
http://www.agner.org/optimize/optimizing_cpp.pdf
I agree that optimization is a fine thing and that C++ is especially well...
-
That's right.
When you compare a C-array and an std:vector it doesn't matter where they're (both) allocated be it in static, automatic or free memory.
You are confusing C++ with the...
|
Click Here to Expand Forum to Full Width
|