I have been told to develop a virtual com port so an app the company has can read off com "comCompanyNameV1".. I tried to pick apart com0com, but it seem so incomplete I'm finding I have to kludge around large parts of it and I have yet to get anything to come close to compiling. Mostly because the tools that are outlined to use to build...
I have developed my own Report Control which is simply nothing but drawing text on a CDC of the control window's client DC. I have got the printing function to work too. The report output is sent to the printer directly. However I want to let the user know the output before the report is actually printed.
I cannot do this using MFC's p...
I'm working in an embedded environment (Arduino/AVR ATMega328) and want to implement the Factory Method pattern in C++. However, the compiler I'm using (avr-gcc) doesn't support the new keyword. Is there a way of implementing this pattern without using new?
...
I want to show a progress bar (like wget) how do i keep writing to the last line in the console?
Windows 7
vis 2005
c++
...
In this question creating a factory method when the compiler doesn't support new and placement new is discussed. Obviously some suitable solution could be crafted using malloc() if all necessary steps done by placement new are reproduced in some way.
What does placement new do - I'll try to list and hope not to miss anything - except th...
Consider and client server scenario and you got two options:
You can include Server's Public Key
in Client and perform the exchange.
You can use Diffie Hellman
KeyExchange Algorithm to handshake
and then exchange the key.
Which one is more secure way?
also if public key will come from store say from Client CA store? would it be more ...
I have the following existing classes:
class Gaussian {
public:
virtual Vector get_mean() = 0;
virtual Matrix get_covariance() = 0;
virtual double calculate_likelihood(Vector &data) = 0;
};
class Diagonal_Gaussian : public Gaussian {
public:
virtual Vector get_mean();
virtual Matrix get_covariance();
virtual double calculat...
This is in C, but I tagged it C++ incase it's the same. This is being built with:
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.220 for 80x86
if that makes any different
Why does this work?
(inVal is 0x80)
float flt = (float) inVal;
outVal = *((unsigned long*)&flt);
(results in outVal being 0x43000000 -- cor...
I'm working on building the Boost platform for a currently unsupported toolchain. Obviously we'd like to verify that the compiler is building everything OK, so we've some measure of how successful the porting is going. However it's not immediately clear whether or not Boost has such a test suite, good ol' Google fails me (or I fail at Go...
Hi,
I got a wxWidgets form with a progress bar on it and i update the progress from a thread using my own custom wxWidget event. This works fine except the fact is the form only shows the progress update when i move the mouse. I have tried adding Refresh() and Update() after the new progress value is set but with no luck.
Am i doing so...
I was wondering if it is possible for a program to prompt the user with a UAC prompt to raise it's own privileges without starting another process.
All the examples I can find on the internet seem to ShellExecute "runas" which creates a new process with elevated privileges.
If this is not possible then my best solution I guess would be...
I'm trying to access an xml file over http. The address is similar to:
http://localhost/app/config/file.xml
When pasting this in a browser the xml is displayed as expected. In my software I am using:
MSXML2::IXMLHTTPRequestPtr rp;
...
rp->open( "GET" , "http://localhost/app/config/file.xml" );
and getting the following response:
<...
I hav created a com componet for some Display method in C# it returns a String List
as shown below. In v++ i hav used std::lst to catch the return value from Disp() but it
gives compiler error that Disp is not a member of class. I i make return type a s void then
it works fine. what i can modify so that Disp return a List and in mai...
Hi. We got a homework assignment to create a Microsoft Word document using Visual Studio 2005 and C++. Could anyone explain how this could be done. I was trying to do it using VSTO, but I've had no luck. All resources on the internet I could find explain how this could be done in VB or C#, but I need some C++ examples.
Thanks
EDIT: Acc...
Can anyone help with this...
vector<unsigned int> *vVec = new vector<unsigned int>;
vVec .reserve(frankReservedSpace);
start = std::clock();
for(int f=0; f<sizeOfvec; f++)
{ //Populate the newly created vector on the heap
vVec .push_back(pArray[f]);
}
I'm getting:
error C2228: left...
I'm trying to use std::string instead of char* whenever possible, but I worry I may be degrading performance too much. Is this a good way of returning strings (no error checking for brevity)?
std::string linux_settings_provider::get_home_folder() {
return std::string(getenv("HOME"));
}
Also, a related question: when accepting stri...
So what's your best advice for someone who knows application side development (C++/C#) and wants to start developing web applications and websites?
What languages should i start with? (php/javascript/other)
What kind of tips do you have for me?
...
I have a Win32 application and i want to Add a DateTimePicker Control, like the one in .NET. I though don't want to include the whole Framework in my application, nor MFC or whatever.
How can I add the native control in a Way with the least amount of dependencies?
...
First time poster, be gentle!
I have a C++ snippet below with a run-time for loop,
for(int i = 0; i < I; i++)
for (int j = 0; j < J; j++)
A( row(i,j), column(i,j) ) = f(i,j);
The snippet is called repeatedly. The loop bounds 'I' and 'J' are known at compile time (I/J are the order of 2 to 10). I would like to unroll the loop...
I want to partially specialize an existing template that I cannot change (std::tr1::hash) for a base class and all derived classes. The reason is that I'm using the curiously-recurring template pattern for polymorphism, and the hash function is implemented in the CRTP base class. If I only want to partially specialize for a the CRTP base...