Reputation
8,449
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
19 47
Newest
 Nice Answer
Impact
~383k people reached

1d
awarded  Nice Answer
1d
comment Inserting C++ code into C
What platform and compiler are you using?
1d
comment Inserting C++ code into C
Are they compiled separately or in the same source file? If in the same source file, the source file itself must be compiled as C++. As a result, you can only use the subset of C that is also valid as C++.
1d
comment Understanding of Component Object Model
The question is poorly asked because if you do not have any programming knowledge, you won't be able to understand any explanations about COM, and typically you will not need to understand COM anyway. Because COM is potentially a very broad topic, it is difficult to write an answer. Perhaps you can explain what you think it is, and why you think you have a need to know. OOP (object-oriented programming) is a generic term; COM is a Microsoft-specific technology that borrows ideas from OOP.
1d
revised Understanding of Component Object Model
added 222 characters in body
1d
answered Understanding of Component Object Model
1d
comment How does one cycle back to previous options in a C# console application?
(1) Perhaps this question might be more suitable for CodeReview. (2) Maybe you can learn about flowcharts in the meantime, and someone can post a new answer in terms of a flowchart.
2d
comment Software Design, Generic Programming, Physical Devices, and Algorithms in C++
A "design by committee" will need to avoid the pitfalls of "maximally generic way" becoming a "lowest common denominator" (meaning that the design was only able to represent the earliest set of requirements, non-extensible, and unable to provide access to value-added features).
2d
comment Software Design, Generic Programming, Physical Devices, and Algorithms in C++
Android sensors is one design example (not based on C++) that tries to find an all-encompassing representation for all types of sensor data. This assumes that all sensor data at the lowest level can be represented by a fixed-length vector of double-precision floating point values. Providing a uniform representation does not remove the burden of programmers writing code specifically for each type of sensor they use in application-specific ways.
2d
comment Idiomaticy of macros in C++
In addition to the aforementioned situations, compiler-vendor specific variations in keywords such as restrict, export (from a static or dynamic library), and inline / noinline also requires the use of conditional compilation macros. Workarounds for missing C++11 support in some compilers would also require conditional compilation macros.
2d
comment Idiomaticy of macros in C++
@Snowman #pragma once appears to work when compiling with MSVC, GCC and Clang (on Windows, Android NDK, and Xcode), when the source code is compiled as C++.
Jun
29
comment How do I make this functional DSL written in an imperative language more efficient?
Other kinds of rewrites, such as mapping A + A into 2 * A, are also the job of compilers.
Jun
29
comment How do I make this functional DSL written in an imperative language more efficient?
It would be a "common subexpression extraction". And no, there are limits as to what C++ template could do - if you need a compiler (one that restructures expressions), you will need a compiler, or at least an expression rewriter.
Jun
28
comment shared or raw pointer c++
Indeed, rvalue appears to be the right answer, because in this case, adding a Pair to a List causes the List to consume (take away) the ownership of the blob from the Pair. As a result the Pair does not own the blob anymore.
Jun
25
revised (Partially) Sorting a lazy-evaluated collection
added 173 characters in body
Jun
25
answered (Partially) Sorting a lazy-evaluated collection
Jun
24
comment Linux header files for Win32 typedefs like BOOL, LONG, and WCHAR
The UTF8 and UTF16 is going to complicate your porting effort, because the two operating systems have different conventions. Good luck.
Jun
24
comment Linux header files for Win32 typedefs like BOOL, LONG, and WCHAR
See: Windows headers - Windows Data Types. wchar_t is compiler-specific, and on Win32 (which Visual C++ compiles to), it is assumed to be 16-bit.
Jun
24
comment When do micro-benchmarks make sense?
@blalasaadri I agree with your viewpoint. Each project has its own optimal choices.
Jun
24
comment When do micro-benchmarks make sense?
@blalasaadri It doesn't mean longer operations aren't worth measuring. It simply means (1) organize your microbenchmarks by orders-of-magnitude, i.e. run your milliseconds-level tests in one suite, and seconds-level in another suite, and long-running tests in yet another. (2) Microbenchmarks need to implement a timeout mechanism, because it is possible that a coding error will make a function that used to take milliseconds now take infinitely forever. This timeout mechanism can be brutal, e.g. by killing the testing process.