c++

convert md5 string to base 62 string in c++

i'm trying to convert an md5 string (base 16) to a base 62 string in c++. every solution i've found so far for converting to base 62 only works if you can represent your number as a 64 bit integer or smaller. an md5 string is 128 bits and i'm not getting anywhere with this on my own. should i just include a bigint library and be done ...

submit data to webform

How I can submit string to webform, if I using QWebKit, c++? <div style="text-align:center;"> <form id="postform" method="post" action="javascript://" onsubmit="chat.add();"> <div> <script type="text/javascript"> <input type="button" onclick="chat.add();" class="chat_button" value="Send!" /> ...

C++ enum data structure

Can someone give me a real time need for enum data structure. As in example in some real system where it can be used? And what is the reason for having such a data structure. The example given was enum colors_t {black, blue, green, cyan, red, purple, yellow, white}; But i felt, this is similar to string array. I am trying to underst...

Exception Handling problem in C++

Hii , I am new to C++ programming and need some help regarding the code i wrote below.... Its a basic exception handling program #include<iostream> class range_error { public: int i; range_error(int x){i=x;} } int compare(int x) { if(x<100) throw range_error(x); return ...

Upgrade Path For Legacy Reporting ("Embedded" Access 2003)?

Update: Albert D. Kallal has kindly started the discussion off, and to get some more opinions I'm adding a bounty. This is a nontrivial question about maintenance of a legacy application myself and two other developers support. We are not the original developers, and the code base is 300,000 lines of MFC and business logic tightly co...

How to create class objects dynamically?

Let's say I have a class box, and an user can create boxes. How to do it? I understand I create objects by className objectName(args); but how to do it dynamically, depending on the user input? ...

C++ Static Property

I am having issues accessing a static property in a class. I am getting the following error: shape.obj : error LNK2001: unresolved external symbol "public: static class TCollection<class Shape *> Shape::shapes" The definition of the class is: class Shape { public: static Collection<Shape*> shapes; static void get_all_instanc...

Late binding of COM->NET call with enum value argument(s)

First, note that this is just a learning exercise for me. The intent is to produce a .NET messagebox using nothing but pure C++ (not C++/CLI) and late binding as necessary. This works fine with just a title and text in the messagebox. However, when I try to specify buttons I get back 2147942487 "The parameter is incorrect". On the .NET...

Mutlithreading an OpenGL/WinAPI application

NOTE: Please read the whole thing before posting, you'll see why. So I have an OpenGL/WinAPI application. I'm doing what you would expect, by doing cycles of handling messages, then rendering a frame, handling messages, rendering frame... The trouble is, when I resize or move a window, the screen freezes, and it can look quite ugly. I ...

How to read a multi-session DVD disk size in Windows?

Hi, Trying to read the sizes of disks that were created in multiple sessions using GetDiskFreeSpaceEx() gives the size of the last session only. How do I read correctly the number and sizes of all sessions in C/C++? Thanks. ...

C++ fstream Erase the file contents from a selected Point

I need to Erase the file contents from a selected Point (C++ fstream) which function should i use ? i have written objects , i need to delete these objects in middle of the file ...

ThreadQueue - Development for Servers - C++

Today i got a idea to make an ThreadQueue for C++, for my Server Application. unsigned int m_Actives; // Count of active threads unsigned int m_Maximum; std::map<HANDLE, unsigned int> m_Queue; std::map<HANDLE, unsigned int>::iterator m_QueueIt; In an extra Thread i would to handle these while: while(true) { if(m_Actives != m...

C++, substract certain strings?

Hi, This is a homework, thus I hope you guys dont give me the direct answers/code, but guide me to the solution. My problem is, I have this XXX.html file, inside have thousands of codes. But what I need is to extract this portion: <html> ... <table> <thead> <tr> <th class="xxx">xxx</th> <th>xxx</th...

MFC GUI in main frame and other DLLs that nedd also GUI

Hi all, I have a MFC application which has its GUI implemented as part of the executable code (view-doc architecture etc.) My application uses some DLLs I worte. Now I have to write another DLL which I know it has to have a GUI as well. My question/uncertainty is should I implement the GUI as part of the main application (main GUI) an...

How To Extract Function Name From Main() Function Of C Source

Hi! I just want to ask your ideas regarding this matter. For a certain important reason, I must extract/acquire all function names of functions that were called inside a "main()" function of a C source file (ex: main.c). Example source code: int main() { int a = functionA(); // functionA must be extracted int b = functionB(...

few questions about the C++ preprocessor:

A few questions about the C++ preprocessor: how to make the preprocessor go to a new line into the preprocessoring code? how to make the preprocessor insert a tab character or multiple spaces into the preprocessoring code? how to make the preprocessor insert comments into the preprocessoring code? ...

How are static data and method details stored in C++

Hi, I have a very basic doubt, In C++ does there exist a data structure for each Type which stores static data and methods defined by that type, similar to the data structure that exists in .NET for every Type. Regards, Jeez ...

Which linker setting determines the load path of a shared library?

I have built the Poco C++ library on Mac. When inspecting the built output files I notice that their load paths are absolute paths that point to the build directory. For example: $ otool -L libPocoFoundation.dylib libPocoFoundation.dylib: /Users/francis/orig/poco-1.3.6p2/lib/Darwin/i386/libPocoFoundation.9.dylib (compatibility versi...

How to use CUDA constant memory in a programmer pleasant way?

I'm working on a number crunching app using the CUDA framework. I have some static data that should be accessible to all threads, so I've put it in constant memory like this: __device__ __constant__ CaseParams deviceCaseParams; I use the call cudaMemcpyToSymbol to transfer these params from the host to the device: void copyMetaData(C...

Application structure

Hello, I have such classes: class Base { private: bool mEnabled; public: bool getEnabled() { return mEnabled; } }; class First : public Base; { // ... }; class Second : public Base { Second() { // I have to check First::mEnabled } }; class Manager { First obj1; Second obj2; }; I have some class manager...