I'm using gcov to measure coverage in my C++ code. I'd like to get to 100% coverage, but am hampered by the fact that there are some lines of code that are theoretically un-hittable (methods that are required to be implemented but which are never called, default branches of switch statements, etc.). Each of these branches contains an a...
I am not yet a Boost user. I am however planning to go into it as soon as possible.
However I am little concerned about Boost, and the likely future name collisions or differences with the forthcoming C++0x. (Maybe it is not a real issue, but for example I find the boost lambdas syntax pretty ugly, BOOST_FOREACH aggressive to the eye, an...
I am trying to translate the COM Interop instructions given by my camera manufacturer for C++ to C#.
They write:
To obtain the interface, you use the normal COM functions to ask for the specific interface you need from the capture filter.
For example:
IBaseFilter* pSourceFilter;
...
CComQIPtr<IManufacturersInterface> pKs( pSour...
I am coding in C++ and have a few questions regarding the ellipsis.
Is it possible to pass in class or class pointer into the ellipsis?
Basically what I want to do is to pass in variable number of arguments in the type of char* and class. I am using ellipsis currently and trying to figure out how to pass in the class. If ellipsis isn't...
I have a wide-character XML message that I need to send over a Win32 socket in C++.
TCHAR wszBuffer[1024];
Should I sprintf(szSendBuffer, "%S", wszBuffer) the wide character buffer to a char array before sending it?
What is the correct way to send this?
...
Hi,
I was wondering how to create wall in opengl and it is continuously appears from up and disappers at down screen. I am able to construct wall by GL_QUADS with texture mapping. but do not know how to generate it dynamically whenever player climbs up.
...
I have a formatted data like the following:
Words 5
AnotherWord 4
SomeWord 6
It's in a text file and I'm using ifstream to read it, but how do I separate the number and the word? The word will only consist of alphabets and there will be certain spaces or tabs between the word and the number, not sure of how many.
...
I have a templated class that performs an action on the class that is given as template argument. For some of my classes I want to 'group' the functionality in one class, to make it easier for the caller. In fact the code looks something like this (names were changed):
template<typename T>
class DoSomeProcessing
{
public:
process(T...
pixel_data is a vector of char.
When I do printf(" 0x%1x ", pixel_data[0] ) I'm expecting to see 0xf5.
But I get 0xfffffff5 as though I was printing out a 4 byte integer instead of 1 byte.
Why is this? I have given printf a char to print out - it's only 1 byte, so why is printf printing 4?
NB. the printf implementation is wrapped up...
Yes, it's a noob question...
I have been using Dev-C++ for all my projects so far, but it is incredibly outdated, and so where the libraries. So I opened up my copy of Visual C++ and copied the code. When I compile, a million errors pop up, as if every second line of my code is shit. I would hate to start the project again from scratch....
Hi,
Sorry about the dumb question, but is there a way to draw a character at a random place on the screen without using any "heavy" graphics libraries?
Thanks,
Li
...
Hi,
I know that to receive notifications about win32 process creation or termination we might implement a NT kernel-mode driver using the APIs PsSetCreateProcessNotifyRoutine() that offers the ability to register system-wide callback function which is called by OS each time when a new process starts, exits or is terminated.
My question...
Or do I have to use threads? (C++)
...
I need to save instances of type HANDLE to an array container and iterate over it, finally remove some of them when necessary,
Which container should I use for the purpose of easiness?
...
in c++ i have written a simple program, which accepts 4 to 6 records and then do not accept any more when airline_no is same i.e. 1? The source code is:
#include<fstream.h>
#include<conio.h>
#include<dos.h>
#include<string.h>
#include<stdlib.h>
#include<process.h>
#include<stdio.h>
int lno;
struct airln {int airline_no,routeno,dep_time,...
Hello!
I want to create in my project class "Screen", "Graphics", "Font" and "Environment", but when I type these names and hit enter I get message: "Screen" is reserved class name or "Environment" is reserved class name. I don't want to make CScreen or ScreenC or something like that :/ I have Visual Stuido 2010. Is there any way to fix...
Hello!
I know, there are some similar questions to the following out there, but I couldn't find a concrete answer that helps me. So here's my problem:
I work on an application that does some gui-initialisations on start up. One of the things I have to do, is calling
NetworkConfigurationManager::updateConfigurations ()
This is a asyn...
Hi,
Can someone point me some c++ samples or some c++ librarys that can transport video and voice over a LAN network.
My objective is to activate a web cam in another pc and receive in my pc the video and voice of the another pc (this can be only one way or in both ways pc to pc call, but i only need one way for now, only see and hear ...
Does anybody know if autotrader.com offers an API or something that would help with mass postings of vehicles? Or does anybody have any idea of what to use to create something like this? I was thinking of maybe a mouse location and click over a browser window type of thing.
...
As I know many JEE application servers are written in Java. (JBoss, Tomcat...)
Is Websphere also written in Java?
I found that Websphere's performance is dramatic high, I guess that Websphere is written in C++. I couldn't imagine that the 'heavy' server is able to run so fast in JVM.
Is it true?
...