Hi there,
I use SetWindowText to put a string into an single line edit control. This string contains a '\t' tab character. One my computer this character is correctly resolved into space...
Type: Posts; User: New++
Hi there,
I use SetWindowText to put a string into an single line edit control. This string contains a '\t' tab character. One my computer this character is correctly resolved into space...
Cough, well it was late when I wrote that.
I also think that the address should be the same in such a case. Do you happen to know if this is guaranteed by the standard?
Any ideas?
Up until now I always thought that you can identify an object by it's address in memory. This doesn't hold for upcasted pointers to different base classes when using multiple inheritance. These...
LOL, ouch! Thanks a lot, DaveProgrammer. I don't think I'd have ever noticed this typo... Funny how you can get fixated on what the error should be and don't see the most obvious explanation. And...
Well, and why are they ambiguous?
Quoting "Thinking in C++ Vol. 2":
"A function template is considered more specialized than another if every possible list of arguments that matches it also...
As stated above, the call is "testBinary(x, y, r, modulus<float>())". The exact type of x,y,r shouldn't matter, but as you can see from the error message, they are all of vector<float>.
I hate these template error messages, terrible to read or even understand...
Complete error text:
Compiler: Default compiler
Executing g++.exe...
g++.exe...
The function templates:
template<typename Contain1, typename Contain2,
typename BinaryFunc>
void testBinary(Contain1& src1, Contain1& src2,
Contain2& dest, BinaryFunc f) {
...
I see. Are such features documented somewhere, or do just pick them up with experience?
Well, sooner or later I'll have to look into multithreading and then these kinds of problems will be in the...
It seems this time I was confused. Indeed RedrawWindow with RDW_UPDATENOW sends its messages directly and does not return before they are executed. So if the queue could be full or not doesn't really...
Since I have no idea about multithreading this might be totally off, but doesn't your quote from MSDN refer to sending messages between different threads in one process?
In my previous post I...
Thank you very much joed, calling PeekMessage() once before redrawing the window did the trick.
Still I'd like to know, why the updating process works without PeekMessage() as long as you don't move...
I wrote myself a little application that does some wild I/O on the hdd (hashing files to be precise). I'm using a window with a multline edit control for a simple output which files have been...
I think it's strange that people have been already complaining about this in 1993 and it was never changed. That the problem of dependencies among those definitions might be hard to solve is...
I have a question about the initialization of global variables:
If I define in one .cpp-file "int a = 12" and then declare in the .cpp-file with the main function "extern int a", is it guaranteed by...
Changing your code to this works with me:
#include <iostream>
#include <fstream>
#include <windows.h>
using namespace std;
It might be a case of space in the install dir? That is supposed to cause strange behaviour with dev-cpp. You might want to try reinstalling to a path without space. (If it's installed to one with...
Thanks for the input. :)
So it seems to be safe to ignore the book's statement that this is only possible with pointers to X. Or might this be a case of "you can do it, but you shouldn't do it"?...
I'm working my way through Eckel's "Thinking in C++ " book at the moment and if I interpreted it correctly, the following code should be incorrect (compiler-warning for the "void g(X ex);"):
...