Forum: C++ May 31st, 2008 |
| Replies: 4 Views: 1,071 How about casting
int* a = (int*)x;? |
Forum: C++ May 21st, 2008 |
| Replies: 4 Views: 798 It lists files, you still need recursively delete directories beginning with deepest path. This calss will be more complex, handling configuration file and multitasking.
DirectoryReader.h:
... |
Forum: C++ May 21st, 2008 |
| Replies: 4 Views: 798 You need to empty this folder I guess. That's how Windows works if you noticed.
Right now I am working on file listing class, it places all files in given subdirectory in vector of strings. If you... |
Forum: C++ May 19th, 2008 |
| Replies: 12 Views: 4,921 This way or another, you should use iterators, to avoid exceeding string boundaries.
For example:
string str;
string::iterator iter_str = str.begin();
while(iter_str != str.end())
{...} |
Forum: C++ May 17th, 2008 |
| Replies: 12 Views: 4,921 I don't really want to think at the moment, but I can post you my string reversing piece of code. Safe and elegant.
#include <string>
string str="shankhs";
reverse(str.begin(), str.end()); |