I'm learning C++, and I want to know from those who are very good developers now: What is the best IDE, Visual C++ 2008 Express or Eclipse Ganymede with CDT? Remember that I'm using Microsoft Windows Vista Ultimate. Thanks!
The book that I'm reading is from Deitel: C++ How to Program, 5/e, because I don't know if the code of the book su...
I need to convert double with number of seconds since the epoch to ptime. I'm prety sure there must be an easy way to do this, but I couldn't find anything. Thanks.
Edit: The original timestamp is floating point. I can't change it and i don't want to lose the sub-second precision.
...
Well, I just got the new MSVS 2010 Beta 1, and just like with 2008 express, I just can't figure out how to compile anything, not even a simple hello world program. Anyone have any pointers? I usually just get a blanket fail message. No real information.
Edit: Sorry about that
#include <iostream>
using namespace std;
main()
{
cout ...
How does Staff web service framework compare to others for c++?
...
I am putting together a build system for my Qt app using a qmake .pro file that uses the 'subdirs' template. This works fine, and allows me to specify the order that each target is built, so dependencies work nicely. However, I have now added a tool to the project that generates a version number (containing the build date, SVN revision...
Hi all,
Can someone explain why the following error happens:
#define bla "\xA"
char a [2] = {0};
memcpy (a,bla,1); // a[0] = 0x0a <- Correct
//a[1] = bla; // '=' : cannot convert from 'const char [2]' to 'char'
Thanks,
RM
...
This is what i have so far but I do not think it is right.
for (int i = 0 ; i < 5; i++)
{
for (int j = 0; j < 5; j++)
{
matrix[i][j] += matrix[i][j] * matrix[i][j];
}
}
...
I've got an application, written in C++, that uses boost::asio. It listens for requests on a socket, and for each request does some CPU-bound work (e.g. no disk or network i/o), and then responds with a response.
This application will run on a multi-core system, so I plan to have (at least) 1 thread per core, to process requests in par...
I am a c++ programmer and occasionally I'll come across some code that is using bitwise operators to manipulate things at the bit level, but I have no real understanding of those concepts. So I would like a resource to help me learn it so well that it becomes second nature. Does anyone know of good resources for this? A google search did...
As I understand it, when passing an object to a function that's larger than a register, it's preferable to pass it as a (const) reference, e.g.:
void foo(const std::string& bar)
{
...
}
This avoids having to perform a potentially expensive copy of the argument.
However, when passing a type that fits into a register, passing it as...
Is there any explanation why find() algorithm doesn't work for maps and one have to use map::find instead?
...
Working on porting a 32bit Windows C++ app to 64 bit. Unfortunately, the code uses frequent casting in both directions between DWORD and pointer values.
One of the ideas is to reserve the first 4GB of virtual process space as early as possible during process startup so that all subsequent calls to reserve memory will be from virtual add...
I recently upgraded to GCC 4.4 (MinGW TDM build) and now the follow code produces these warning:
In member function 'void Console::print(const std::string&)':
warning: array subscript is above array bounds
Here's the code:
void Console::print( const std::string& str ) {
std::string newLine( str );
if( newLine.size()...
I need to profile some code running C++ on Linux. Can you guys recommend some profilers?
...
I'm learning C++ and when I was testing the Microsoft Visual C++ 2008 Express and Eclipse Ganymede, but with the g++ compiler as default, I've noted that a same code in VC++ get some errors and in g++ compile normally, without errors or warnings and execute normally, but I want to know what is the difference between VC++ syntax and g++ s...
I'm writing a (C++) application that utilizes a single dialog box.
After setting up a message pump and handler I started wondering how I would go about propagating C++ exceptions to my original code (i.e., the code that calls CreateDialogParam, for instance).
Here's a skeleton example of what I mean:
BOOL CALLBACK DialogProc(HWND, UINT...
Hello,
As I understand it, using XSL to generate documents has two parts:
1) An XML document which references an XSL stylesheet
2) An XSL stylesheet
Let's say that I want to generate a document using XSL, and then send it to a friend. Without relying on the stylesheet being available on the internet, and without including the styleshe...
I am working in a class "A" that requires very high performance and am trying to work out the implications either way.
If I inherit this new class "B", the memory profile of "A" should increase by that much.
If I include just a ptr to "B" as a member variable in "A", then would I be correct in thinking that, as long as "B" is on the ...
Google is failing me (or I am failing Google.)
I am simply looking for the function that executes an INSERT statement using the mysql.h library in C++.
...
I have the following in my IE extension to handle when a tab is switched in IE, etc.
[ATL project, VS2008, C++ using IDispEventImpl]
SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_WINDOWSTATECHANGED,WindowStateChanged)
.
.
.
void WindowStateChanged (DWORD dwFlags, DWORD dwValidFlagsMask);
.
.
.
.
void CHelloWorld::WindowStateChang...