VS 2008 - Link against older C runtime
How can I compile using Visual C++ 2008 and link against an older version of the C runtime (I want version 7 instead of 9)? ...
How can I compile using Visual C++ 2008 and link against an older version of the C runtime (I want version 7 instead of 9)? ...
Is there a VS2008 plugin for code metrics for C++? I have Team System but it doesn't work for non- .NET code. I tried studioTools but it just freezes. So, does anyone know one that actually works? ...
I hear a lot about boost here and I am beginning to think it could help a lot with my software development. More so in concurrency and memory management in my particular case as we have had a lot of bugs in this area. What are the key language features I need to polish up on to effectively benefit from using boost and to shorten the le...
Given the following code: #pragma once class B { public: B(void) { } ~B(void) { } }; I know I can also write this: #pragma once class B { public: B() { } ~B() { } }; What is the purpose of having void in the 1st example? Is it some type of practise that states the constructor t...
Hi All, I am using a WinSock connection to get the accelerometer info off and iPhone and into a Direct3D application. I have modified Apples GLGravity's sample code to get my helicopter moving in relation to gravity, however I need to "cap" the movement so the helicopter can't fly upside down! I have tried to limit the output of the acc...
Duplicate: Unique random numbers in O(1)? I want an pseudo random number generator that can generate numbers with no repeats in a random order. For example: random(10) might return 5, 9, 1, 4, 2, 8, 3, 7, 6, 10 Is there a better way to do it other than making the range of numbers and shuffling them about, or checking the genera...
I found this very cool C++ sample , literally the "Hello World!" of genetic algorithms. I so decided to re-code the whole thing in C# and this is the result. Now I am asking myself: is there any practical application along the lines of generating a target string starting from a population of random strings? EDIT: my buddy on twitter j...
What's wrong with the following little program that passes a function object? #include <iostream> #include <functional> void foo(const std::unary_function<const std::string&, void>& fct) { const std::string str = "test"; fct(str); // error } class MyFct : public std::unary_function<const std::string&, void> { public: void operat...
I'd like to capture the input from a TV remote control and detect which buttons are pressed in my application. The operating system is Linux (Windows answers won't be much use to me, but may be to others). I'm using C++ but C code would work for me also. I'd like to use the code in a fashion similar to this: if (remoteControl.buttonPre...
I would like to port my C/C++ apps to OS X. I don't have a Mac, but I have Linux and Windows. Is there any tool for this? ...
I'm doing some image processing, and I'd like to individually read each pixel value in a JPEG and PNG images. In my deployment scenario, it would be awkward for me to use a 3rd party library (as I have restricted access on the target computer), but I'm assuming that there's no standard C or C++ library for reading JPEG/PNG... So, if yo...
What would be the best way to serialize a given binary tree and inturn evaluate a unique id for each serialized binary tree? For example, I need to serialize the sub-tree (2,7,(5,6,11)) and generate a unique id 'x' representing that sub-tree so that whenever I come across a similar sub-tree (2,7,(5,6,11)) it would serialize to the sam...
Is the C++ term "Container" simply synonymous with the Java term "Collection" ? ...
I like STL algorithms, and prefer use algorithms rather than usual loops. Almost all STL algorithms are usually used as: std::algorithm_name( container.begin(), container.end(), ..... ) container.begin(), container.end() - is one of most popular words pair in my projects. Does anybody have the same problem? How do you Guys solve ...
On an official sqlite3 web page there is written that I should think about sqlite as a replacement of fopen() function. What do you think about it? Is it always good solution to replece application internal data storage with sqlite? What are the pluses and the minuses of such solution? Do you have some experience in it? EDIT: How abo...
I am trying to use boost::unordered_map to cache some values. I try to specify minimum number of buckets in the constructor: #include <boost/unordered_map.hpp> typedef boost::unordered_map<float, float> Mycache; Mycache cache((std::size_t)25165843, boost::hash<float>(), std::equal_to<float>(), s...
I'm learning Qt, found this: Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::WidgetClass) { ui->setupUi(this); } what is ": QWidget(parent), ui(new Ui::WidgetClass)" mean? And how can I get the C++ document about this? ...
This question is related to Symbian OS yet I think that C/C++ veteran can help me too. I'm compiling an open source library to Symbian OS. Using a GCCE compiler it compiles with no errors (after some tinkering :) ). I changed compiler to ARMV5 and now I have multiple errors with the definitions of static const structs, for example: I hav...
What Windows API functions are available to execute command prompt's functionality? For example, I like to execute dir command and want to show the output in GUI without using cmd.exe in Windows. ...
At my university we are currently developing a VST-Plugin on Windows using open source tools. My professor is pretty fond of Microsoft Visual Studio and rather sceptic towards open source tools such as Eclipse, GCC, Subclipse etc. However, until now I was able to solve all of his problems and it would be a shame if he could not be con...