c++

Cannot convert from const Point to const D2D1_POINT_2F

class ADot : public Shape { private: Point me_; operator D2D1_POINT_2F() const;//HERE I HAVE CONVERSION OPERATOR BUT IT DOES NOT WORK public: ADot(signed, signed); ~ADot(void); void draw()const; Point center() const; Point north() const; Point south() const; Point east() const; Point west() con...

Initialization of object static members

Static members confuse me sometimes. I understand how to initialize a simple built in type such as int with something along the lines of int myClass::statVar = 10;, which you place in a .cpp file, but I have something of the following sort: class myClass { public: // Some methods... protected: static RandomGenerator itsGenerator; } ...

Parse .pls / .m3u in phonon (Qt)

Hi Can i get some help to parse .pls / m3u formats in phonon player. So far i know phonon doesn't support playlist. When any playlist is entered in open location it gives an error like codecs text/text-uri not found. ...

Any ideas for a dissertation?

Hi I was wondering whether anyone had some ideas for a dissertation i have to do for university. It will be a 12 month project and I will probably be looking to do something in c++ but I'm open to anything. I was thinking about looking in AI but not sure. Thank in adv. ...

How to write console data into a text file in C++?

Hi All, I'm working on a file sharing application in C++. I want to write console output into a separate file and at the same time I want to see the output in console also. Can anybody help me...Thanks in advance. ...

Kdbg doesn't allow inspection of contents of std::string or std::vector

I'm using Kdbg as my debugging tool for routine purposes, but it doesn't appear to have any way to inspect the contents of a std::string or std::vector. This is a bit of a drawback as use of the standard library is definitely the Approved Way. Does anyone know how to make it do this, or does anyone know of a GUI debugger that does? (Kdb...

Tracking - and correctly ending - native and managed threads in a C# - C++/CLI - C++ Windows forms application prior to exit

This is a follow-on from: http://stackoverflow.com/questions/3264245/debugging-a-multithreaded-c-c-cli-c-solution-in-visual-studio-2008-what Please excuse the format, I've just repeated some of the description of the application here: I've inherited a project consisting of three levels of code. The lowest layer is native C++ that inte...

Qt - How to specify and make constant an element size in a layout?

Say there is a QHBoxLayout and some widgets in it. How to specify a widget width and hight in the layout, so that while resizing the widget which containes the layout the given width and hight stay constant? ...

C# - Capturing Windows Messages from a specific application

I'm writing a C# application which needs to intercept Window Messages that another applications is sending out. The company who wrote the application I'm monitoring sent me some example code, however it's in C++ which I don't really know. In the C++ example code I've got they use the following code: UINT uMsg = RegisterWindowMessage(S...

Output difference in gcc and turbo C

Why is there a difference in the output produced when the code is compiled using the two compilers gcc and turbo c. #include <stdio.h> int main() { char *p = "I am a string"; char *q = "I am a string"; if(p==q) { printf("Optimized"); } else{ printf("Change your compiler"); } return 0...

eclipse ide needed to be integratewd with misra rules

how can i integrate misra rules with eclipse ...

Does LoadBitMap() API creates paint issues?

I have a legacy system written in C++, MFC. I was checking a piece of code where LoadBitmap() was replaced with LoadImage() API. The comment written in the code says "LoadBitmap() uses the Paged pool from Kernel memory and if the usage reaches the maximum limit then the paint issues would pop up. So LoadImage API should be used". I goo...

In C++, any general guidelines for handling memory allocation/deletion?

Probably all that I'm asking for is a link to a website that I have yet to find. But coming from a Java background, what are the general guidelines for handling memory allocation and deletion in C++? I feel like I may be adding all sorts of memory leaks to my application. I realize that there are several variants of smart pointers, an...

Hybrid Inheritance Example

Can anyone suggest any real life example of Hybrid inheritance? ...

Highlight C/C++ Programming Mode in WinEdit 5.5

Hi all, I would like to use Winedit 5.5 to write my C-programs. Anyone knows how I can active C/C++ highlighening in this editor? I looked around for quite a while on google, but I did not come across an easy solutions. Thanks for any hints, Markus ...

Timer Interrupt for pthreads

How can I implement timer interrupt using pthreads? ...

vtune - no symbols available [Solved]

I have used vtune several times in the past, usually without too much trouble. Unfortunately the gaps between each use are often so long that I forget some aspects of how to use it each time. I know that the line number and symbols information needs to be stored somehow. I thought that all that was required was to compile your exe with "...

C++ - How to work with BIG numbers?

Possible Duplicates: BigInt in C? How to implement big int in C++ How do we work with big numbers without making use of external libraries and functions? Some problems are as follows: What is the sum of the digits of the number 21000? Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. ...

typedef and non-simple type specifiers.

Why is this code invalid? typedef int INT; unsigned INT a=6; whereas the following code is valid typedef int INT; static INT a=1; ? As per my understanding unsigned int is not a "simple type specifier" and so the code is ill-formed. I am not sure though. Can anyone point to the relevant section of the Standard which makes the fi...

var arg list to tempfile, why is it needed?

I have this code inside a constructor of a class (not written by me) and it writes a variable arg list to a tmp file. I wondered why this would be needed? The tmpfile is removed after this ctor goes out of scope and the var arg list sits inside the m_str vector. Can someone suggest a better way of doing this without the use of a tmp...