c++

looking for GSM SMS component/ActiveX

Hi, I'm looking for a delphi component or ActiveX which can access to GSM devices through serial port. I need to send and receive binary data sms (8-bit coding). ...

Communication between c++ and actionscript 3

Is it possible to use any IPC mechanism for calling a c++ api from Adobe Flash actionscript? Are there any good examples? Update: I primarily want it for desktop apps now i.e Adobe's/or anyuone else's desktop runtimes ...

functions with const arguments Overloading ( Follow up)

This is a follow up of the Previous Question It got really complicated so I am starting a new thread to make my point clearer.( Didnt want to delete the previous thread because the other guys who gave valuable feedback dont not loose the reputation points they gained) Updated Code: (Complies and Works) #include <iostream> using std...

possible heap corruption (win 32, native c++)

I'm working with a single-threaded native c++ application. There is a very hard to reproduce bug that I cannot reproduce locally. I enabled full page heap and debug information in the release executable, and obtained dumps from a client (which has to use the application many days to get the bug). What the client reports: the applicatio...

Simulate Fn+F11 key press

Can you tell me how I can simulate key presses Fn + F11 on a laptop? Do I have to write a driver, or something like that? The platform is Windows XP Pro SP3. Programming Language is C/C++. The purpose is create a program that allow to change enable/disable via GUI some hardware device that can turned off/on only with this hotkey. The ID...

Combobox style edit control in winAPI

Hi again, In my winAPI project done in C++ (no MFC, no .net...), I am creating comboboxes in place of edit controls, because of the nice blue border. In many windows forms and dialogues, edit controls also have this look. There are two problems: This doesn't seem like like "proper" way to make an edit control look that way. What if I ...

command line menu (CLI) from XML

Hi, assuming the following xml as input <root><element1>value1</element1><element2>value2</element2></root> I would like to create a CLI with it's options created automatically from the XML elements For example: Enter value for element1: Enter value for element2: element1 and element2 are extracted from the XML input. Is there an...

Reading File in C++

I am unable to figure out why my code is not able to open and read a file. What am i missing? #include <iostream> #include <fstream> #include <string> using namespace std; int main (int argc, char * const argv[]) { string line; ifstream myfile ("input_file_1.txt"); if (myfile.is_open()) { while (!myfile.eof()) ...

Writing a Prototype Constructor in C++

homework help time! I am taking a quadratic expression, where y=ax^2 + bx + c with a,b,c are constants and x is a variable. Here is my class: class quadratic { public: double evaluate(const double x); void getCoefficients (double &A, double &B, double &C); void setCoefficients (const double A, const double B, const double C); private:...

Problem with combobox

Whenever I resize my controls in my window, in resopnse to a WM_SIZE message, they resize and redraw themselves fine. But my combobox control (a dropdown list) disappears whenever I give it a resize message, until I hover over it to bring it back. There are two possibilities, either it is not redrawing when I resize it, or it is being h...

Is there a way to debug Android kernel code?

I've got some trouble with the media backend (mostly Stagefrightplayer) in Android, and I'd like to understand why it throws the errors it does. The errors are usually device spesific, so debugging on an emulator wouldn't be sufficient. Example: I/AwesomePlayer( 147): mConnectingDataSource->connect() returned -1004 V/MediaPlayerServi...

Template+Dependent Name

$14.6.2/3 - "In the definition of a class template or a member of a class template, if a base class of the class template depends on a template-parameter, the base class scope is not examined during unqualified name lookup either at the point of definition of the class template or member or during an instantiation of the class template o...

QListWidget that resizes instead of scrolls

How do you change the behavior of a QListWidget so that it resizes its height instead of choosing a (seemingly arbitrary) height and adding scrollbars? See screenshot: The QListView's should fill up as much space horizontally as they can (creating as many "columns," if you will.) Then they wrap and make as many rows as necessary to fi...

RAII in C++/CLI

I'm used to the C++ RAII facilities, and I want to use RAII the right way with managed code in C++/CLI. Herb Sutter and Microsoft both tell me this is the best practice. I have something like this: ref struct Managed { // No default constructor Managed( /*...*/ ) { /*...*/ } ~Managed() { /* Important non-managed resource re...

how to force to redirect the message on the screen?

Hi, I am running a C++ program and there are other underling code. When I run it, suppose it is a.exe, there are a lot of information printed on the screen. I can't redirect some information to a .txt file like ./a.ext > temp.txt How can I force it is redirect to the temp.txt? Thanks! ...

Where to put third party libraries to setup a c++ linux development environment?

Hello all! I'm not new in C++ although I'm new in Linux. I'm using CMake to precompile a cross platform game engine with some third party, but I have a lot of doubts about using libraries. My question is how to work with third party libraries. And where to put this libs. Apt installs libs in their official place (/usr/local, /usr/lib/ .....

C++/QtTestLib programatically get number of functions in class

Within my C++/QtTestLib Class, how can I get a count of the number of private functions in this class so that I can output it at runtime? ...

C++: using a base class as the implementation of an interface

In C++ is it possible to use another base class to provide the implementation of an interface (i.e. abstract base class) in a derived class? class Base { virtual void myfunction() {/*...*/}; } class Interface { virtual void myfunction() = 0; } class Derived : public Base, public Interface { // myfunction is implemented...

libpng: write a bigger png than 1002px

Hey folks, I'm currently writing a c++ program which should write me a png file as output. So I made a little code, actually works. I just took the source code from here and condesed it. My code is nopasted here. BUT: It only works if it doesn't exceed 1002 pixels in width. I am very sure the problem is somewhere around lines 29/30, so...

const-ness as template argument

I have two structs: // ----- non-const ----- struct arg_adapter { EArgType type; // fmtA, fmtB, ... union { TypeA * valueA; TypeB * valueB; // ... more types } arg_adapter(TypeA & value) : type(fmtA), valueA(&value) {} arg_adapter(TypeB & value) : type(fmtB), valueB(&v...