Iīd like to add that deque has a larger overhead than vector, this can be a serious problem if you need to store huge amounts of data, especially with small data types. At least STLport and...
The easiest way:
The installer creates a registry entry containing the date of installation (maybe the prgram itself when itīs first run). Upon every start you check the current date against the...
In conclusion itīs pretty pointless to delete the executable, because you cannot prevent the user from making a backup and running it over and over again. If you want to make sure the program cannot...
Since I donīt know what your data looks like I chose the type T for the data stored in the vector and type U for the find criteria. const is just a promise not to alter the variables during the...
No, itīs impossible for an application to delete its executable (at least on Windows).
This issue is usually solved by a patcher application, the patcher first checks and performs updates and then...
You missed one level of indirection. A pointer is a variable which stores one address, itīs not the address itself. So using the pointerīs "value" means accessing a specific memory location.
Each...
Instead of using raw C-style arrays for temporary variables you should seriously consider using std::vector instead.
I took a glance at your code and noticed some strange things:
Not sure how other compilers deal with that issue, but MS compilers handle the individual expressions in an if clause as sequence points if they´re combined by && or ||. This guarantees that the...
Empirical investigations showed that all subjects always chose Spock (at least the four guys I know of), so picking lizard always wins ;)
What do you think about an algorithm that uses a range of...
std::map is a container that stores key/value pairs. In this case the key type is an unsigned int (the contact ID) and class Contact (the contact data itself). Basically it looks like a table...
Ok, I see. In that case std::map is the container of your choice, because it makes the search for the next free ID much simpler and efficient than std::vector. Please look at this example:
1) Does it make sense to store all your data in memory and occasionally save the whole data? You could perform all changes in RAM and don´t have to bother with fragmentation or holes.
2) Is it...
You can either omit the batch file at all and follow the approach I advised in my previous approach or specify a window coordinate where the command window cannot be seen. Use the dwX, dwY and...
That cannot be done with C++, you have to use the Win32 API (which should be available since you want to start the target application in Win98 compatibility mode). Your problem can be solved with 3...