> The keyword this is a prvalue expression whose value is the address of the object for which the function is called. The type of this in a member function of a class X is X*. If the member function is declared const, the type of this is const X*.
@rogcg That's really all there is to it from a callee's perspective.
@rogcg const member functions cannot call non-const member functions on the same object. Frequently it helps to have a const version of a function, and a non-const version with a different return type. (iterator and const_iterator)
@KerrekSB Wide-oriented binary streams makes sense?
> Each stream has an orientation. After a stream is associated with an external file, but before any operations are performed on it, the stream is without orientation. Once a wide character input/output function has been applied to a stream without orientation, the stream becomes a wide-oriented stream.
@KerrekSB They come from the C standard, and the C++ standard mentions off-hand that the same rules are in effect for the C++ streams. However, in Windows they're ignored. E.g. documented as not supported for Visual C++.
@RMartinhoFernandes Well, the underlying data would still be in bytes, which is the space in which seek moves around, but the extractable data would be in wide characters. So one could expect certain coherence constraints.
I.e. starting at the front you can move forward one character, but you can't just jump to a random location and expect to be in a meaningful state.
> Data read in from a binary stream shall compare equal to the data that were earlier written out to that stream, under the same implementation. Such a stream may, however, have an implementation-defined number of null characters appended to the end of the stream.
Ah, 7.19.2/5 (7.21.2/5 in C11): "Binary wide-oriented streams have the file-positioning restrictions ascribed to both text and binary streams." @KerrekSB There's your definitive answer. Not based on a footnote.
> Great things come out of abusing C++. One example is the abuse of templates (which were originally designed to support parametrized data types) to express compile-time computations. The result is Template Metaprogrammming (TMP).
@Beginnernato Look good. You should run some tests (include failure cases, and extreme cases, like needles longer than haystacks, empty needles, empty haystacks, etc) anyway, but it looks like it's on the right path.
@TonyTheLion Someone mentions "nads" and Tony says "ohai". Like clockwork.
> Since concepts are not part of C++11, we’ll have to rely on programming discipline and hope that, if we make a mistake, the compiler error messages will not be totally horrible.
In mathematics, pointless topology (also called point-free or pointfree topology) is an approach to topology that avoids mentioning points. The name 'pointless topology' is due to John von Neumann. The ideas of pointless topology are closely related to mereotopologies in which regions (sets) are treated as foundational without explicit reference to underlying point sets.
General concepts
Traditionally, a topological space consists of a set of points, together with a system of open sets. These open sets with the operations of intersection and union form a lattice with certain properties. ...
I suddenly have the feeling that I have absolutely no idea how to implement invisible objects/bones.
Right now, I use hardware instancing to store the world matrix of every bone in a vertex buffer, and then send them all to the pipeline. But when dealing with frustrum culling, or having them set...
It's been confusing me for too long already. Things I've noticed:
When there are multiple votes being cast on the same post in succession of each other, it constantly keeps flashing back and forth between a bunch of numbers. I just want to see what the current count is. I really don't care what...
> It has long been my belief that most of the conflicts in history were brought about by a indirect result of sexual repression. If everyone was watching porn or at least masturbating once a day, there'd be a lot less fighting.
Apperently 40 hours a week for 3+ months in this room is not enough time to get on the "frequently in room" list. Does AFK count or do you guys not have lives outside of SO?
The article claims fseek(stream, 0, SEEK_END) is undefined behaviour by citing an out-of-context footnote.
The footnote appears in text dealing with wide-oriented streams, which are streams that the first operation that is performed on them is an operation on wide-characters.
This undefined beh...
I know what wrong .... but i cant think of a condition to make, when to set j back to 0 ... its currently in my else case... where it doesnt do much :S
@RMartinhoFernandes alrite .. kay well soo if a[i] = b[j] then i interate both j and i ...but now i + 1 doesnt equal j + 1 ... so my idea is set j = 0 and check ... but i need to use i++ somehow to make the loop break. but i dont want to use i++.. but instead i want to set j = 0 and see if it equals i +1 :S
yea ... so now i want to reset j to 0 and start at the same point in "i" .. so i dont iterate i .... but eventually i need to iterate i .... i cant think of a condition to make this so :S
You should really try running in the debugger. Say, the first iteration tests a[0] == b[0], in that case, 'a' == 'a'. So, both i and j get incremented. Then it tests a[1] == b[0], that is, 'a' == 'r', which is false. The else branch is picked, j becomes 0 and i becomes 2. This tests a[2] == b[0].
I have a framework written in VBScript. Inside some function in this framework parameter of the function is checked for Nothing in If statement and then some actions executed.
Code that uses framework written in Javascript. So I need to pass Nothing to function to perform some actions. In IE8 and...