c++

How to check if specific web browser is installed on system?

How to check if specific web browser (chrome, firefox, opera) is installed on system? (C++/Windows platform). Maybe this can be check in somewhere in registry? ...

Embedding Rake in a C++ app? Or is there a Lake for LUA?

I've found a couple of questions about embedding Ruby in a C++ app. Almost all of the top-voted answers suggest using Lua instead. Given that a project I have in mind would be better served by the grammar already expressed in Rake (it's a rules engine), is there any easy way to embed Rake in a C++ app, or is there a Rake-like module for...

Which C++ opensource projects have very high code quality?

I would like to list some of the best quality projects in the opensource C++ world. I know the question is very broad, but it can serve as a good resource for learning from top quality examples. ...

What is the quickest way to find the maximum of two floats in C++?

What is the quickest way to find the maximum of two floats: a) y = std::max(x1, x2); b) if (x1 > x2) y = x1; else y = x2; c) y = x1 > x2 ? x1 : x2; Thanks ...

What is the difference between iterators in Java and C++?

How is the implementation of Iterator in Java different from that in C++? ...

Is there something like libtcc for C++, or an extremely fast C++ compiler?

Hello, There is very good compiler tcc and its library libtcc, that allows direct compilation of code inside code. i.e. Allows creation of self-generated code. I'm looking for similar library for C++, if any exists. Or, I need and extremely fast reasonably good C++ compiler, so I may run it to generate shared object and dlopen it. I do...

What are C++ non-template members as used in the Barton-Nackman trick?

From wikipedia: // A class template to express an equality comparison interface. template<typename T> class equal_comparable { friend bool operator==(T const &a, T const &b) { return a.equal_to(b); } friend bool operator!=(T const &a, T const &b) { return !a.equal_to(b); } }; class value_type // Class value_type wants to have ...

tidy code for asynchronous IO

Whilst asynchronous IO (non-blocking descriptors with select/poll/epoll/kqueue etc) is not the most documented thing on the web, there are a handful of good examples. However, all these examples, having determined the handles that are returned by the call, just have a 'do_some_io(fd)' stub. They don't really explain how to best approac...

Integrating swf in c++

Is there any way of making c++ gui applications that include .swf? The swf file are pretty small and easier to make than gif or other kind of animations so it would be nice to be able to include them. Some recommendations of a library, free or even open source... ...

how do i setup Borland C++ for OpenGL?

I am new to OpenGL. I want to setup my Borland c++ for openGL on Windows XP SP2. When I include windows.h or GL/glut.h I get "error: directory not found." I tried to include windows.h by using quotes as well as the angled brackets. How do I setup my PC for OpenGL application development? ...

"CruiseControl" Automation for C++ projects?

We've got a C++ Project that currently uses Make on Linux to build. I'd like to automate it similar to a Java Project under CruiseControl. 1) Is there a project similar to CruiseControl for C++ projects? OR 2) Is there a good "how-to" on using CruiseControl for C++ Projects? ...

Help with Autocomplete feature in Tablet PC

Environment : Visual Studio 2005 , using the Tablet pc SDK Language : C++, COM, ATL I am using the COM classes for development of Ink recognition characters. I am using IInkCollector, IInkDisp, and IInkRecognizer. I am able to capture the ink and recognize it too. But I want the Autocomplete feature so the handwriting automatically g...

How to make a wxFrame behave like a modal wxDialog object

Is is possible to make a wxFrame object behave like a modal dialog box in that the window creating the wxFrame object stops execution until the wxFrame object exits? I'm working on a small game and have run into the following problem. I have a main program window that hosts the main application (strategic portion). Occasionally, I nee...

How to get the minimize and maximize buttons to appear on a wxDialog object

I've run into an issue using a wxDialog object on Linux In the construtor for the object I pass the relevant style flags (wxCAPTION|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxCLOSE_BOX|wx_RESIZE_BORDER) but the buttons don't show up. When I was designing the class in wxformbuilder they would appear on the displayed design but don't show up in my ...

How do I pass a Generic::List by reference?

In an attempt to wrap some unmanaged code in a managed .dll I'm trying to convert a Generic::List of data points into a std::vector. Here's a snippet of what I'm trying to do: namespace ManagedDLL { public ref class CppClass { void ListToStdVec( const List<double>& input_list, std::vector<double>& output_vector ) ...

Educational IDE to start programming in C++?

I'am aware there has been a generic question about a "best IDE in C++" but I would like to stress I'm a new to C++ and programming in general. This means I have the needs of a student: relatively easy and unbloated working environment things just work, focus on the code color coding to show the different language features (comments, e...

Why is this C++ class not equivalent to this template?

Can somebody explain to me why the following works: template<class T> class MyTemplateClass { public: T * ptr; }; int main(int argc, char** argv) { MyTemplateClass<double[5]> a; a.ptr = new double[10][5]; a.ptr[2][3] = 7; printf("%g\n", a.ptr[2][3]); return 0; } But this doesn't: class MyClass { public: d...

C++ OpenGL application as a web service

Dear all, Let me explain the situation: we have created an OpenGL application in C++ which visualizes some physical simulations. The basic application is contained within a DLL which is used by a simple GUI. It currently runs on a desktop PC, but we have the idea to turn it into a web service. Since the simulations require dedicated h...

Is it possible to open PDF files in Turbo C++ and if so, how?

I am doing a project in C++ and I want to open PDF files. How can I do it in turbo c++? Do I have to switch to another IDE? Edited: I am doing an "E-book management" in c++. After managing the software i wanted to open pdf file through my program and do no access adobe reader or aome other. Sorry for incomplete question. ...

Why does g++ complain when using templated typedefs in graph_traits<>?

When I try to compile this code: struct BasicVertexProperties { Vect3Df position; }; struct BasicEdgeProperties { }; template < typename VERTEXPROPERTIES, typename EDGEPROPERTIES > class Graph { typedef adjacency_list< setS, // disallow parallel edges vecS, // vertex container bidirectionalS, // directed graph property<verte...