c++

Movement towards continuous integration in progress, any suggestions?

We have a bunch of C/C++ modules and projects for QNX4, QNX6 and Linux. All of these are written in Eclipse/QNX Momentics and we use Project Sets (psf files) to combine different modules into projects as required. The projects are built using make. The psf files specify which modules are required for a certain project. I have looked at ...

What's the connection between the heap used in dynamic memory allocation and the data structure?

Possible Duplicate: Why are two different concepts both called heap? I've googled around, but cannot find the answer for this question; what's the connection between the heap used in dynamic memory allocation and the data structure? Is memory organized on the heap in a way which is similar the the heap data structure? If so, t...

Resize entire QTableWidget (not columns or rows)

Probabaly a newbie question here. Is there a way for the user to drag resize QTableWidget? My QTableWidget is nested inside a tab widget, therefore it is not a window by itself. I tried implementing a QSizeGrip, but when I drag resize the grip the entire window resizes and not just the table. ...

When using .Net Interop (generated with TlbImp) my COM object refuses to execute in surrogate (dllhost)

This is very odd. We have some managed C++ (an assembly) which uses a .NET COM interop dll generated by TlbImp to make calls into a COM object. When we register the COM DLL we specify that we want it to execute within a surrogate (the "DLLSurrogate" registry entry). Our COM DLL is 64-bit and is executing on a 64-bit platform. When we ...

Using custom and built-in properties in Boost::Graph

Hi, I am building a graph class based on the following suggestion: http://stackoverflow.com/questions/671714/modifying-vertex-properties-in-a-boostgraph Unfortunately, I realized an unexpected behavior. When using my own vertex-properties (for simplicity please ignore the edge properties), the built-in properties seem not to be used. S...

Design question regarding threads

Hi I have class A and classes B and C. class B runs one thread and class C runs n threads. class A should start the threads and than wait for a signal from the user (say Ctrl-c in Linux) - class A will stop all threads (of classes B and C), do some final work and the application will exit. The question is: how should class A sleep unti...

Help with char input and printing in C++

Hello guys, i want to read characters from the console and print them one after another only if they have a certain value. Well i tried using something like this: char c; while (c != '\n') { c = getch(); if (printable(c)) cout << c; // where printable is a function which checks // if ...

How to convert for loop to STL for_each statement.

Hi, I would like to convert my for loop to STL std::for_each loop. bool CMyclass::SomeMember() { int ii; for(int i=0;i<iR20;i++) { ii=indexR[i]; ishell=static_cast<int>(R[ii]/xStep); theta=atan2(data->pPOS[ii*3+1], data->pPOS[ii*3]); al2[ishell] += massp*...

Using Windows header files within Netbeans 6.8

I'm trying to make an windows application within Netbeans. When using Visual studio it is no problem to use files like tchar.h I have receaved a basic file structure containing those and I'm trying to get them to work on Netbeans IDE but it seems that Netbeans won't allow using files from Visual Studio. I have tried to add the tchar.h ...

Cleaning up threads referencing an object when deleting the object (in C++)

I have an object (Client * client) which starts multiple threads to handle various tasks (such as processing incoming data). The threads are started like this: // Start the thread that will process incoming messages and stuff them into the appropriate queues. mReceiveMessageThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)receive...

C++, vector of objects

In c++, is using a vector of objects a good idea? If not, what's wrong with this c++ code? #include <vector> using namespace std; class A {}; int main() { vector<A*> v ( new A); return 0; } from g++: 13: error: invalid conversion from A*' tounsigned int' ...

How to start Learning C++

Possible Duplicate: What is the best source to learn C++? I have been coding in C for quite some time now (around 3 years). Now i wish to learn programming in C++ and code in object oriented methodology. There has been some discussion on how to start learning C++ http://stackoverflow.com/questions/525726/the-best-place-to-st...

which protocol used for developing a chat application over LAN?

Hi I would like to create a chat application(desktop-app) in c++, so which protocol i would need to study and implement. UDP(?) Please provide me some good thoughts and advices and links also. ...

Undefined Reference Problem in Eclipse

Hello, I am using Eclipse Galileo 3.5 with CDT 6.0 I am having a problem in including the header files located in c:\cs106 ... I searched on google and found that I have to go to Project Properties > C/C++ General > Paths and Symbols and in GNU C++ I have added the path c:\cs106 And eclipse is able to find them now but the other probl...

How to set prefix/suffix to a Barcode Scanner programatically in C?

Hi! I want to create an application, where i can set, what prefix or suffix i want to send to the Barcode reader. The barcode reader may connect to the PC with USB or RS-232 ports. I mean if i have a barcode like "4567", and i set in my application that it should send a prefix like "123" to the barcode scanner, than if i read my barcode...

Looking for some input on my C++ program. Simpletron, Machine language.

Edit: So, seems I do have a problem somewhere in my coding. Whenever I run the program and input a variable, it always returns the same answer.."The content at location 76 is 0. Okay guys, I posted on here a few days ago about a question but it was just a compilation error, so if this looks familiar, thats why. I will reiterate, I'm new...

gdb on top of LLVM?

Is there any debugger, like gdb or something else, aimed for C/C++, that runs on top of LLVM? Given how well engineered LLVM is, this almost seems like a perfect opportunity. ...

When do c++ stream objects use mutexes?

In the answer to this question ovanes states: Please be aware that boost::lexical_cast is much slower as atoi. I also use it very often in a performance non-critical code. The problem with lexical_cast is that it uses stringstream for conversion. If you are working in a multi-threaded environement any stream class from ...

Free numerical libraries, C++, Windows

Hello everyone, I am totally new to math/numerical analysis programming and I was looking all over the internet to find appropriate libraries. What I stumbled upon are CLAPACK, Boost::uBLAS, ATLAS. I need to solve SLEs (system of linear equations) so I guess BLAS itself would not be sufficient without some implementation of LAPACK. No...

Polynomial Calculator

Hello all, I'm doing a polynomial calculator and i'll need some help as i'll progress with the code. For now I made only the polinom class which i represented it as a linked list with terms and some functions(only read and print the polynomial functions for now). Here's the main program which for now only read a polynomial and prints i...