I am trying to compile simple program under linux. These are the set of operations I performed.
[mypc@localhost programs]$ vim heap.cpp
[mypc@localhost programs]$ g++ -c heap.cpp
[mypc@localhost programs]$ chmod 777 heap.*
[mypc@localhost programs]$ g++ -c heap.cpp
[mypc@localhost programs]$ ./heap.o
bash: ./heap.o: Permission denied...
I'm normally programming in c++, but are using some clibrary functions for my char*.
Some of the manpages like for 'getline', says that input should be a malloced array.
Is it ok, to use 'new' instead?
I can see for my small sample that it works, but could this at some point result in some strange undefined behavior?
I know that a 'n...
I'm trying to make a orb of light (Like a sun) but I can't seem to make it visible at all. I'll give you some snipets of code I have. It's in Java LWJGL, so it might look a little different.
private float lightAmbient[] = { 0.0f, 1.0f, 1.0f, 1.0f }; // Ambient Light Values ( NEW )
private float lightDiffuse[] = { 1.0f, 1.0f, 1.0f, ...
hello. I'm trying to run a method on the GUI thread using QMetaObject::invokeMethod, which returns true. But, if I use Qt::QueuedConnection my method never gets called (even if invokeMethod returns true).
This is what I'm using:
QMetaObject::invokeMethod(this, "draw_widgets", Qt::QueuedConnection)
I don't get any error messages or an...
I need to use a third party DLL which I don't have header , lib or object file of it just DLL alone, I follow this article "Explicitly Linking to Classes in DLL's" in codeguru and able to user function, c++ class from that DLL but there some function call that need to pass or return a struct like this undecorated function I get from PE E...
I am working on a 3rd party c++ app. It is crashing during the exit. If I look at the stack all I get is the __static_initialization_and_destruction_0 function and lots of questions marks. Project is huge and unfortunately it has many static objects. Is there any way to find out which one is crashing?
...
Is there any tutorial, that shows, how to work with Poco::Net::MulticastSocket ?
...
I have written a sample MFC application in which there are two threads:
-Main thread ( UI thread)
-Worker thread ( non-UI thread)
I have a specific requirement to create a Modal dialog in Non-UI ( worker thread).
When I create the CDialog object and call DoModal on the same, it works. The dialog gets created and acts as Modal t...
I'm writing a function that should generate random sudoku puzzles for a simulation project; this funcion takes as argoument the number of cells to generate then it generates the indexes of cells and numbers to put in those cells.
I have a problem in generation of cells indexes, I'm not an expert in programming and i can't find a good ro...
Created by Microsoft as the foundation
of its .NET technology, the Common
Language Infrastructure (CLI) is an
ECMA standard (ECMA-335) that allows
applications to be written in a
variety of high-level programming
languages and executed in different
system environments. Programming languages that conform to the CLI have
...
I have a class named "SimObject":
namespace simBase
{
class __declspec(dllexport) SimObject: public SimSomething
{
public:
template <class T>
void updateParamValue( const std::string& name, T val );
}
}
I have another class named "ITerrainDrawable":
namespace simTerrain
{
class __decls...
Hi,
We have lot of products and there are some common DLLs across each product's application. Right now we copy each common DLL into each product's bin directory and treat them as private assembly. This unnecessarily increase the msi size of each product and when a problem occurs in a DLL we have to build each product's msi comprising t...
HRESULT error code - MSOEAPI_E_INVALID_STRUCT_SIZE
Works fine on WinXP x32.
...
Hello, I'm using QTreeView with QDirModel like this:
QDirModel * model = new QDirModel;
ui->treeView->setModel(model);
ui->treeView->setSelectionMode(QTreeView::ExtendedSelection);
ui->treeView->setSelectionBehavior(QTreeView::SelectRows);
This works fine, however, I'm not sure how to get the details about the files I select. I've got...
Hi,
I'm writing an MD3 model loader in C++ and I understand the file format and what I need to do but I can't seem to get the syntax right. I have a class for the model and within that class there are a set of structs which will have the model data read into them. In the implementation of the class there is a constructor which reads da...
I have created an additional thread in some small testing app and want to suspend the main thread from this additional thread. The additional thread is created via CreateRemoteThread from an external process.
Since SuspendThread needs a HANDLE to the thread which should be suspended, I want to know how to get this HANDLE from code runni...
I'm looking at some 3rd party code and am unsure exactly what one line is doing. I can't post the exact code but it's along the lines of:
bool function(float x)
{
float f = doCalculation(x);
return x > 0 ? f : std::numeric_limits<float>::infinity();
}
This obviously throws a warning from the compiler about converting float->bool, but ...
It's not very hard to break binary backwards-compatibility of a DSO with a C++ interface. That said, is there a static analysis tool, which can help detecting such ABI breaks, if it's given two different sets of header files: those of an earlier state of the DSO and those of the current state (and maybe DSOs as well)? Both free and comme...
How to turn Sequence of images into video using DirectShow filters?
I have image A and image B and image C. I want to create a DirectShow graph (Using GraphEdit or with C\C++\C# for example) to create a video of 3 frames in duration where first frame is image A second image B and so on =)
How to do it?
...
How to create a DirectShow graph which would wait for incoming images and add them as frames into video file?
Using GraphEdit or with C\C++\C#
So I want to have a graph which would work and wait for images incoming into him in any way you think is most easy (for example We can have a folder from where DSfilter would be able to take ima...