Learning C++ Templates
Can anyone recommend any good resources for learning C++ Templates? Many thanks. ...
Can anyone recommend any good resources for learning C++ Templates? Many thanks. ...
C++ was the first programming language I really got into, but the majority of my work on it was academic or for game programming. Most of the programming jobs where I live require Java or .NET programmers and I have a fairly good idea of what technologies they require aside from the basic language. For example, a Java programmer might be...
I have been working as a native C++ programmer for last few years. Now we are starting a new project from the scratch. So what is your thoughts on shifting to C++\CLI at the cost of loosing platform independent code. Are there are any special advantages that one can gain by shifting to C++\CLI? ...
I've always used a *.h file for my class definitions, but after reading some boost library code, I realised they all use *.hpp. I've always had an aversion to that file extension, I think mainly because I'm not used to it. What do you use and why? Edit: I realise both are ok, I'm just talking about personal preference. ...
For an std::map<std::string, std::string> variables, I'd like to do this: BOOST_CHECK_EQUAL(variables["a"], "b"); The only problem is, in this context variables is const, so operator[] won't work :( Now, there are several workarounds to this; casting away the const, using variables.count("a") ? variables.find("a")->second : std::stri...
I need a way to represent a 2-D array (a dense matrix) of doubles in C++, with absolute minimum accessing overhead. I've done some timing on various linux/unix machines and gcc versions. An STL vector of vectors, declared as: vector<vector<double> > matrix(n,vector<double>(n)); and accessed through matrix[i][j] is between 5% and 100...
What is the "best" tool for creating deployment packages/jobs/stuff for all "enterprise level" deployments..... GAC, COM+, Credentials, App pools, Web sites, registry entries, etc... It would be best if there is a way to "tokenize" the credentials and registry entries so that we can enter the appropriate credentials for the "next" enviro...
Ok, this probably has a really simple answer, but I've never tried to do it before: How do you launch a web page from within an app? You know, "click here to go to our FAQ", and when they do it launches their default web browser and goes to your page. I'm working in C/C++ in Windows, but if there's a broader, more portable way to do it I...
I am trying to adapt an existing code to a 64 bit machine. The main problem is that in one function, the previous coder uses a void* argument that is converted into suitable type in the function itself. A short example: void function(MESSAGE_ID id, void* param) { if(id == FOO) { int real_param = (int)param; // ... ...
Do you have any sugestions of tools to ease the task of understanding C/C++ code? We just inherited a large piece of software written by others and we need to quickly get up to speed on it. Any advice on tools that might simplify this task? ...
Right now, I have a tool tip that pops up when I hover over an edit box. The problem is that this tool tip contains multiple error messages and they are all in one long line. I need to have each error message be on its own line. The error messages are contained in a CString with a new line seperating them. My existing code is below. ...
I noticed that writing to a file, closing it and moving it to destination place randomly fails on Vista. Specifically, MoveFileEx() would return ERROR_ACCESS_DENIED for no apparent reason. This happens on Vista SP1 at least (32 bit). Does not happen on XP SP3. Found this thread on the internets about exactly the same problem, with no re...
I have the following code that I wrote but it the SQLBindCol does not seem to work correctly (of course I could have screwed up the whole program too!.) THe connection works, it creates the table in the DB, addes the record fine and they all look good in SQL Enterprise Manager. So what I need help with is after the comment "Part 3 & 4:...
I'm looking for a profiler to use with native C++. It certainly does not have to be free, however cost does factor into the purchase decision. This is for commercial work so I can't use personal or academic licensed copies. The key features I'm looking for are: Process level metrics Component level metrics Line-level metrics Supports ...
I'm working on a loosely coupled cluster for some data processing. The network code and processing code is in place, but we are evaluating different methodologies in our approach. Right now, as we should be, we are I/O bound on performance issues, and we're trying to decrease that bottleneck. Obviously, faster switches like Infiniband wo...
I've got a bunch of servers running this Linux app. I'd like for them to be able to generate a GUID with a low probability of collision. I'm sure I could just pull 128 bytes out of /dev/urandom and that would probably be fine, but is there a simple & easy way to generate a GUID that is more equivalent to the Win32 one? Specifically, o...
So I've got an application whose window behavior I would like to behave more like Photoshop CS. In Photoshop CS, the document windows always stay behind the tool windows, but are still top level windows. For MDI child windows, since the document window is actually a child, you can't move it outside of the main window. In CS, though, you ...
Suppose I have the following declaration: class Over1 { protected: class Under1 { }; }; I know that I could do the following: class Over2 : public Over1 { protected: class Under2 : public Under1 { }; }; But is there a way to declare Under2 without Over2? Since you would have to exte...
I generated the stubs and proxy classes through soapcpp2 from multiple wsdls all at once. So all the namespace bindings are in a single nsmap file. Now the problem is all the namespace bindings are being send with all the method calls I make. The http post packet is unusually large and ugly. Is there anyway i can programatically override...
In many C/C++ macros I'm seeing the code of the macro wrapped in what seems like a meaningless do while loop. Here are examples. #define FOO(X) do { f(X); g(X); } while (0) #define FOO(X) if (1) { f(X); g(X); } else I can't see what the do while is doing. Why not just write this without it? #define FOO(X) f(X); g(X) ...