I have a COM dll that is working fine as an in-proc server and I install it in Component Services COM+ Applications. Now when I try to CoCreate it from my client app, I get HRESULT 0x8007007e "The specified module could not be found". What could be causing this?
...
This is the method for creating a variable on the heap in C++:
T *ptr = new T;
ptr refers to a pointer to the new T, obviously. My question is, can you do this:
T *ptr = new T*;
That seems like it could lead to some very, very dangerous code. Does anyone know if this is possible/how to use it properly?
...
I using Qt3.3 and I'm trying to create an QApplication without display.
I need to check signals from QSocket objects, and this is the reason that I need the QApplication.
I'm trying to do QApplication( 0, 0 ), but I'm getting "QApplication: invalid Display* argument.".
How is the correct way to do it?
...
In the type of embedded programming I'm getting into, determinism and transparency of the running code are highly valued. What I mean by transparency is, for instance, being able to look at arbitrary sections of memory and know what variable is stored there. So, as I'm sure embedded programmers expect, new is to be avoided if at all pos...
Hello,
Does anyone know of a good resource that will show me how to load an image with C++ and spin it?
What I mean by spin is to do an actual animation of the image rotating and not physically rotating the image and saving it.
If I am not clear on what I am asking, please ask for clarification before downvoting.
Thanks
...
I have three legacy applications that share a lot of source code and data. Multiple instances of each of these applications be executed by a user at any time, e.g. a dozen mixed application executions can be active at a time. These applications currently communicate through shared memory and messaging techniques so that they can maintain...
When I read a text file to a wide character string (std::wstring) using an wifstream, does the stream implementation support different encodings - i.e. can it be used to read e.g. ASCII, UTF-8, and UTF-16 files?
If not, what would I have to do?
(I need to read the entire file, if that makes a difference)
...
I have a base class:
class RedBlackTreeNode
{
// Interface is the same as the implementation
public:
RedBlackTreeNode* left;
RedBlackTreeNode* right;
RedBlackTreeNode* parent;
Color color;
TreeNodeData* data;
RedBlackTreeNode():
left(0),
right(0),
parent(0),
color(Black),
...
Hi,
I'm trying to join two big files (like the UNIX cat command: cat file1 file2 > final) in C++.
I don't know how to do it because every method that I try it's very slow (for example, copy the second file into the first one line by line)
¿What is the best method for do that?
Sorry for being so brief, my english is not too good
...
I am using BOOST_FOREACH to iterate through the characters of a C++ string like this:
void foobar(const string& str)
{
BOOST_FOREACH(const char ch, str)
{
// Do something with ch
}
return;
}
This piece of code works fine with the following compilation modes:
Multi-threaded (Release) (/MT)
Multi-threaded Debu...
I want to learn STL by quick browsing of real project source.
Where can I find a high quality project that uses STL?
...
Hi,
A C++ hash_map has the following template parameters:
template<typename Key, typename T, typename HashCompare, typename Allocator>
How can I specify a Allocator without specifying the HashCompare?
This won't compile :(
hash_map<EntityId, Entity*, , tbb::scalable_allocator>
...
I've seen a lot of arguments over the general performance of C code compiled with a C++ compiler -- I'm curious as to whether there are any solid experimental studies buried beneath all the anecdotal flame wars you find in web searches. I'm particularly interested in the GCC suite, but any data points would be interesting. (Comparing the...
Update:
A entity is an object created with attributes/methods of a given entity template. A entity may have a parent and/or a number of children.
Every entity template has a thread fragmentation cost and a computer fragmentation cost. They define how costly it will be to have children of that entity on different computers/thread from t...
If I want to create a function template, where the template parameter isn't used in the argument list, I can do it thusly:
template<T>
T myFunction()
{
//return some T
}
But the invocation must specify the 'T' to use, as the compiler doesn't know how to work it out.
myFunction<int>();
But, suppose I wanted to do something similar, ...
Is there a tool for C++ that is at least remotely similar to Rails migrations?
...
Can an object of ifstream type used for file reading be a static member of a class? I want to read a file and store each line in an array of objects of a class i have created. I want the file reading object to belong to the entire array of objects instead of one single instance of the class.
...
Hello,
I need to create a service on windows using Visual C++ 6.0 .
I am not familier with services so I read in the msdn site.
Can someone send me likns to agood sites explaining (with example) how to create service using Visual C++ 6.0 (prefer with examples) ?
...
Hi!
I want to check the current color depth of the OS to warn users if they try to run my application with a "wrong" color depth (using c++ & Qt).
I guess there's a win api call to get this information, but I couldn't find anything...
Thaks for any hint, Hannes
...
So the question I have today has to do with interfacing with a USB mouse plugged into a linux machine. However, I don't want the mouse to have any traditional effect on the X environment -- I just want to be able utilize the encoders embedded within it through raw input. So here's my question.
How can I obtain low level but meaningful...