is this possible in C++?
to create an instance of another class from a class even if the class I want to have an instance of is declared next of the class I am creating an instance from. Just like in C# and Java. Thank you ...
to create an instance of another class from a class even if the class I want to have an instance of is declared next of the class I am creating an instance from. Just like in C# and Java. Thank you ...
Possible Duplicate: How to output array of doubles to hard drive? Hello everyone, Sorry for asking the same question twice, I'm new at this and still learning how to use this site properly. I want to store an array of floats/doubles to my hard drive in the form of a file (.txt .dat .bin, whatever, it doesn't matter). I want ...
hello all is there any lib or well known method to save audio web streaming ( web radio , mp3 streaming) to file programmatically ? ...
I was reading some articles on net regarding Vtable thunks and I read somewhere that thunks can be used to hook /chain procedures calls. Is it achievable? Does anyone know how that works , also I am not able to find good resource explaining thunks. Any suggestions for that? ...
This is what I did: LPMALLOC malloc; LPITEMIDLIST pidl; SHFILEINFO FileInfo; SFGAOF sfGao; if (SUCCEEDED(SHGetMalloc(&malloc)) { if (SUCCEEDED(SHParseDisplayName(strDirPath, NULL, &pidl, SFGAO_FOLDER, &sfGao))) { SHGetFileInfo((LPCWSTR)(PCHAR(pidl)), 0, &FileInfo, sizeof(FileInfo), SHGFI_PIDL | SHGFI_ICON); CDC*...
In the code below, why it is that when I take the address of a map index (which contains a list) and I take the address of the list itself, they both have different values. See the code below for clarification. #include <iostream> #include <list> #include <map> using namespace std; int main() { list<char> listA; //list of chars...
Hello, noob here still experimenting with templates. Trying to write a message processing class template template <typename T> class MessageProcessor { //constructor, destructor defined //Code using t_ and other functions foo( void ) { //More code in a perfectly fine method } private: T *t_ }; All defined in a header file. ...
Hello, This is my first post here. I have a problem. I need to take a sceenshot of the desktop, convert it to jpeg, store it in a buffer and then manipulate it and send it over the internet. I have written the code for doing this with GetDC....and GDI+ for converting the HBITMAP to jpeg. The problem I am having now is that I don't know...
Hi, I would like to see if a value equals any of the values in an array. like this Beginning of function(here I give Val differnt values with for loops...) for (i=0;i<array_size;i++) if (Val==array[i]) do something else do something else if non of the above values matched val... If none of th...
Hello, Does anyone know of an easy 3D modeling application like sketchup but is opensource? I don't have time for learning blender ( guess I never will ): and I'm a fan of having multiple small tools do their part of the job ( first cut the plank using the saw the nail it using the hammer :) ). Edit: I also might need to do some modi...
Using Visual Studio 2005 As per the title; MSDN and google can't tell me, I'm hoping it'll let me know if the contained string contains Unicode characters or not - but that's a different problem! ...
Java has compiler checked exceptions. When I made transition to C++, I learned it doesn't feature checked exceptions. At first, I kept using exception handling, because it's a great feature. However, after a while I abandoned it, because I got into a situation every function might throw an exception. As only a small percentage of the fun...
I am having a problem with my code. I get an intermittent error that the capacity/limit for the transaction is already reached. However, I already checked the BeginTransaction and CommitFreeAndNil call with my code and it does delete all transaction. I also checked my whole code and there are no other instance of the BeginTransaction. ...
Recently I got question on implement Singleton but abstract base class involved. Suppose we have class hierarchy like this: class IFoo {...}; // it's ABC class Foo : public IFoo {...}; we have singleton class defined as follows: template <typename T> class Singleton { public: static T* Instance() { if (m_instance == NULL) { ...
I am sure that this kind of questions must have been asked before, but failed to find anything by searching this site. My apologies in advance if I missed any similar questions. Is there anything in C++ that just does date manipulation at all? I am aware of SYSTEMTIME structure (it is the structure returned when you do GetSystemTime I ...
For tracking user activity, I am using a Windows Hook for the main application thread, and monitor (among others) WM_COMMAND messages. I receive them as expected from dialog buttons, toolbar buttons, accelerators and popup menus, but I do NOT receive them from the main menu. Strangely enough, Spy++ does show the main window receiving t...
Hello, Horrible title I know, horrible question too. I'm working with a bit of software where a dll returns a ptr to an internal class. Other dlls (calling dlls) then use this pointer to call methods of that class directly: //dll 1 internalclass m_class; internalclass* getInternalObject() { return &m_class; } //dll 2 internalclass*...
Hi! Let's say I have a class Point: class Point { int x, y; public: Point& operator+=(const Point &p) { x=p.x; y=p.y; return *this; } }; Why can I not call this as such: Point p1; p1 += Point(10,10); And is there any way to do this, while still having a reference as the argument? ...
Doesn't the space occupied by a variable get deallocated as soon as the control is returned from the function?? I thought it got deallocated. Here I have written a function which is working fine even after returning a local reference of an array from function CoinDenom,Using it to print the result of minimum number of coins required to...
I use this snippet to create a console fron inside a dll. That dll gets loaded in a game. CODE SNIPPET The console window creates fine. But when i write stuff to it, i just get stuff like "???D??". I know i have to use the printf() syntax. So i use wprintf("%s", "test"); Any pointers? ...