Forum: C++ Sep 28th, 2008 |
| Replies: 2 Views: 221 |
Forum: C++ Sep 28th, 2008 |
| Replies: 2 Views: 221 passing params to CreateThread i have a bunch of data i want to pass to CreateThread. i created a struct as per the msdn documentation. here it is:
typedef struct ThreadRecvData
{
std::list<char> data;
Ogre::String... |
Forum: C++ Jun 18th, 2008 |
| Replies: 0 Views: 243 exception handling in winproc hi,
im creating a library, in which there is a winproc that is started in a function called StartMessageLoop. This function is started as a seperate thread from another function called Init. heres... |
Forum: C++ Apr 6th, 2008 |
| Replies: 9 Views: 598 Re: Please Help - Linked List here's my advice. when you create pointers, always always always set them to NULL. same goes for when you delete them. in your 'replace' function, you go into a 'while temp is not NULL' loop, then... |
Forum: C++ Apr 5th, 2008 |
| Replies: 9 Views: 598 |
Forum: C++ Apr 5th, 2008 |
| Replies: 9 Views: 598 Re: Please Help - Linked List you have declared your NodeType constructor like this:
NodeType(NodeType newelement, long id, string nam, string pho, char stats, float inc)
so you need to make sure that each time you 'new' your... |
Forum: C++ Feb 22nd, 2008 |
| Replies: 4 Views: 384 |
Forum: C++ Feb 22nd, 2008 |
| Replies: 4 Views: 384 wierd exception handling - can someone explain ? can someone please try and explain something to me...
i have 2 functions, lets call them FuncA and FuncB. FuncA calls FuncB, and FuncB does some stuff then simply returns. both functinos are... |
Forum: C++ Jan 27th, 2008 |
| Replies: 2 Views: 1,549 Re: singleton pattern and its destructor... yes, that indeed fixes the problem, thank you.
however, i would still like to understand why that was happening. at what point does the default copy constructor get called in my sample code above,... |
Forum: C++ Jan 26th, 2008 |
| Replies: 2 Views: 1,549 singleton pattern and its destructor... im making a singleton class in c++ and have a couple of questions. first, heres my .h and .cpp files:
// Singleton.h
class Singleton
{
public:
static Singleton GetSingleton();
void... |
Forum: C# Sep 28th, 2007 |
| Replies: 1 Views: 1,185 Re: XmlSerializer issue. i think i found the problem, by accident.
originally, the set accessors were commented out in the properties (although they are not in the code above). this causes the value not to be serialized.... |
Forum: C# Sep 28th, 2007 |
| Replies: 1 Views: 1,185 XmlSerializer issue. hi,
im using this code to serialize my class into xml:
public static void Save(Class1 myClass)
{
System.Xml.XmlTextWriter w = new System.Xml.XmlTextWriter(@"./myFile.cfg",... |
Forum: C++ Jul 11th, 2007 |
| Replies: 1 Views: 1,213 Re: COM aggregation ah ha,
the code assumes that the component is aggregated. if is not being aggregated then the code does not make sense, in fact i think it will recursively call QueryInterface if its not IY and... |
Forum: C++ Jul 11th, 2007 |
| Replies: 1 Views: 1,213 COM aggregation I've been learning about aggregating COM objects.
I dont understand why we 'need' 2 IUnknowns (ie the delegating IUnknown and the Non-delegating IUnknown). Surely the same effect can be achieved... |
Forum: C++ Jun 26th, 2007 |
| Replies: 2 Views: 1,913 |
Forum: C++ Jun 26th, 2007 |
| Replies: 2 Views: 1,913 Re: dllRegisterServer problem this also happens in VS.NET 2003.
ah ha, i used a tool to view exported functions from dlls and i can see that when i do STDAPI DllRegisterServer, the function is not exported. So im guessing this... |
Forum: C++ Jun 26th, 2007 |
| Replies: 2 Views: 1,913 dllRegisterServer problem hi,
im creating a win32 dll using VS.NET 2005. actually im creating a COM component so i need to implement DllRegisterServer. The problem is that when i call regsvr32 on the dll, i get the error... |
Forum: C++ Jun 23rd, 2007 |
| Replies: 2 Views: 1,709 |
Forum: C++ Jun 23rd, 2007 |
| Replies: 2 Views: 1,709 |
Forum: C++ Feb 18th, 2007 |
| Replies: 9 Views: 2,972 |
Forum: C++ Feb 18th, 2007 |
| Replies: 9 Views: 2,972 Re: callbacks and class member functions... well ive been doing a bit of reseach on this and it looks nasty. declaring the callback as static gets rid of the 'this' pointer, (so registering it as a callback is fine), but because of this it... |
Forum: C++ Feb 18th, 2007 |
| Replies: 9 Views: 2,972 callbacks and class member functions... i have a BaseClass and a DerivedClass. i need the BaseClass to register a glut callback, but i need the DerivedClass to determine what the callback does.
heres the code:
(.h)
class... |
Forum: C Jan 13th, 2007 |
| Replies: 0 Views: 906 how to return a value from a thread i am using CreateThread to, unsurprisingly, start a thread :p
is it possible to return a value? i need to return either true or false at least. ideally i need to return 0, 1 or 2 to indicate the... |
Forum: Computer Science and Software Design Jan 8th, 2007 |
| Replies: 2 Views: 1,372 |
Forum: Computer Science and Software Design Jan 6th, 2007 |
| Replies: 2 Views: 1,372 performance of some C++ apis i am using a couple of methods to calculate the distance between any 2 points on the earths surface. the methods are the law of cosines, and the haversine formula.
the law of cosines formula uses... |
Forum: Computer Science and Software Design Jan 6th, 2007 |
| Replies: 3 Views: 1,792 |
Forum: Computer Science and Software Design Jan 3rd, 2007 |
| Replies: 3 Views: 1,792 |
Forum: Computer Science and Software Design Jan 2nd, 2007 |
| Replies: 3 Views: 1,922 |
Forum: Computer Science and Software Design Dec 31st, 2006 |
| Replies: 3 Views: 1,922 (another) big O question heres a question: i understand that array insertion is carried out in constant time - O(1) - but if the array is 2D (n*n), then would this still hold true if i wanted to insert the same value into... |
Forum: Computer Science and Software Design Dec 31st, 2006 |
| Replies: 2 Views: 1,477 |
Forum: Computer Science and Software Design Dec 28th, 2006 |
| Replies: 2 Views: 1,477 big O question if an algorithm takes a total time of T(log n + n^2), is this big O(log n + n^2) or simply big O(n^2) ? |