I'm having some trouble compiling my code - it has to do with the types I'm passing in. Here is what the compiler says:
R3Mesh.cpp: In copy constructor 'R3Mesh::R3Mesh(const R3Mesh&)':
R3Mesh.cpp:79: error: no matching function for call to 'R3Mesh::CreateHalfEdge(R3MeshVertex*&, R3MeshFace*&, R3MeshHalfEdge*&, R3MeshHalfEdge*&)'
R3Mesh....
Hello there,
I'm having a bizarre problem with C++ where the long data type is overflowing long before it should. What I'm doing (with success so far) is to have integers behave like floats, so that the range [-32767,32767] is mapped to [-1.0,1.0]. Where it stumbles is with larger arguments representing floats greater than 1.0:
inline ...
Hi,
I was asked about one question I totally had no idea.
What's the another name for function object in C++
1) Actions
2) Predicates
3) Operators
4) Use case.
I am confused about the point the question is supposed to deliver.
I searched online a lot but no clue about that.
...
template <class T>
class List
{
public:
List();
~List();
...
protected:
template <class T> struct Item
{
struct Item* next;
T data;
};
...
struct Item<T>* allocate();
};
template <class T>
struct Item<T>* List<T>::allocate() // error he...
Whenever I search for an algorithm for 2-Sat, I get back the algorithm for the decision form of the problem: Does there exist a legal set of values that satisfy all the clauses. However, that does not allow me to easily find a set of satisfying boolean values.
How can I efficiently find a legal set of values that will satisfy a 2-Sat in...
I need to get a list of user names from Active Directory using C++Builder. I know I could shell out to batch file and run the csvde.exe command but surely there is a nicer way using a library or something, right? Are there any C++ libraries? (hopefully with examples?)
Many thanks!
-Dan
...
I need to be able to stream audio from a custom file format on the C++ side of the Android system. I am working on porting a custom media player and need to be able to open a custom file and stream audio from it. This is important as I do not think porting the whole player to JAVA is feasible from a performance stand point and moving t...
Hi,
I've got a std::vector which I need to sort by selected algorithms for certain operations, but to maintain its original state (e.g. items ordered by when they were entered) the rest of the time.
Obviously I can use std::copy to create a temporary vector and sort that, but I'm wondering if there's a better way, possibly by timestamp...
Hey guys. I am reading a book and It told me to open a empty WIN32 project. create source file called main.cpp. Put it in the source folder (This is the only file i have in my project). In that file put the following code
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmd...
I have a map that represents a DB object. I want to get 'well known' values from it
std::map<std::string, std::string> dbo;
...
std::string val = map["foo"];
all fine but it strikes me that "foo" is being converted to a temporary string on every call. Surely it would be better to have a constant std::string (of course its probably ...
Hi, i've a c# wincontrol that depends on a bunch of c++ unmanaged dlls.
dotnetctrl.dll
+
+--myliba.dll
+
+--mylibb.dll
Is there a way to include these mylib[a|b].dll when deploying the dotnetctrl.dll?
i.e. When in a project I add a reference to dotnetctrl, is there a way to make the mylib dlls available in the right path just li...
I'm about to start developing a sub-component of an application to evaluate math functions with operands of C++ objects. This will be accessed via a user interface to provide drag and drop, feedback of appropriate types followed by an execute button.
I'm quite interested in using flex and bison for this having looked at equation parsing...
When I create a empty Win32 project. My intellisense stopped working. Is it possible to get it working for empty Win32 Projects with 1 source file ? Thanks
...
I want to programaticly retreive the Interface ID for any or any class so that I can pass it to CoCreateInstance. Any help is very much so appreciated!!
See "How Do I Get This" below:
HRESULT hResult;
CLSID ClassID;
void *pInterface;
if(!(hResult = SUCCEEDED(CoInitialize(NULL))))
{
return 1;
}
if(S_OK == CLSIDFromProgID(OLESTR("S...
hi,
I have a number of 3x3 matricess that I want to multiply together For example:
m1*m2*m3*m4*m5
Although MTL is a recommended way, I don't have this library and can't use it.
Can someone please suggest a conventional way to multiply these 3x3 matrices (all matrices m1 to m5). Code snippet (for matrix multiplication and multiplyi...
Sorry for stupid questions, I'm doing everything as described in this tutorial:
http://www.functionx.com/visualc/howto/calldlgfromdlg.htm
I create the dialog window and try to call another dialog in response to a button press using the following code:
CSecondDlg Dlg;
Dlg.DoModal();
Modal window appears but isn't active, and main wind...
OK, I have sort of a tricky problem I'm attempting to solve. First of all, an overview:
I have an external API not under my control, which is used by a massive amount of legacy code.
There are several classes of bugs in the legacy code that could potentially be detected at run-time, if only the external API was written to track its ow...
I have an NSDocument-based Cocoa app and I have a couple of secondary threads that I need to terminate gracefully (wait for them to run through the current loop) when the users closes the document window or when the application quits. I'm using canCloseDocumentWithDelegate to send a flag to the threads when the document is closing and th...
Hi,
I have a Qt application that I compile in release configuration, run, and then perform operation X in the program. Everything runs fine.
I then compile it in debug configuration, run without debugging (so CTRL+F5), perform operation X in the program. Everything still runs dandy fine.
But when I try to run the debug configuration w...
My code was working fine, until I tried to wrap all of my class definitions in a namespace.
// "Player.h"
#include "PhysicsObject.h"
namespace MaelstromII
{
class Player : public MaelstromII::PhysicsObject
{
// ...
};
}
// "PhysicsObject.h"
#include "GameObject.h"
namespace MaelstromII
{
class PhysicsObject : pu...