c++

Total beginner looking for tutorials programming outlook add ins in c++

hello all im total beginner in outlook programming and windows GUI programming in general but have lots of years experience in c++ programming in general ( none GUI ) i need to develop outlook plug-in . and my question is where to start ? what i need to know to let me start can you please give me some useful links to learn ? Thanks all ...

How to run a dictionary search against a large text file?

We're in the final stages of shipping our console game. On the Wii we're having the most problems with memory of course, so we're busy hunting down sloppy coding, packing bits, and so on. I've done a dump of memory and used strings.exe (from sysinternals) to analyze it, but it's coming up with a lot of gunk like this: ''''$$$$ %%%% ...

Why do my radio buttons not work?

I'm working on an MFC dialog application in Visual C++ 2005. My radio buttons are m_Small, m_Medium, and m_Large. None of them display what they are supposed to in my m_Summary edit box. What could be wrong? Here's my code. // Pizza_ProgramDlg.cpp : implementation file // #include "stdafx.h" #include "Pizza_Program.h" #include "Pi...

gdb says "cannot open shared object file"

Hello all, I have one binary and one shared library. The shared library is compiled with: all: g++ -g -shared -fpic $(SOURCES) -o libmisc.so the binary is compiled with: LIBS=-L../../misc/src LDFLAGS=-lmisc all: g++ -g -o mainx $(INCLUDE) $(SOURCE) $(LIBS) $(LDFLAGS) I set in ~/.bashrc export LD_LIBRARY_PATH=/mnt/sda5/Programming/m...

managing relationships between agregated / composited members of a class

I am creating entities for a simulation using aggregation and composition. In the following C++ example: class CCar { CCar( CDriver* pDriver ) { m_pDriver = pDriver; } CDriver* m_pDriver; CEngine m_Engine; CDriverControls m_Controls; }; in the above example, a car consists of an engine and a set of driving con...

Help with algorithm to dynamically update text display.

First, some backstory: I'm making what may amount to be a "roguelike" game so i can exersize some interesting ideas i've got floating around in my head. The gameplay isn't going to be a dungeon crawl, but in any case, the display is going to be done in a similar fasion, with simple ascii characters. Being that this is a self exercise,...

Opening a file on unix using c++

I am trying to open a file in c++ and the server the progam in running on is based on tux. string filename = "../dir/input.txt"; works but string filename = "~jal/dir1/dir/input.txt"; fails Is there any way to open a file in c++ when the filename provided is in the second format? ...

How to programmatically move a window slowly, as if the user were doing it?

I am aware of the MoveWindow() and SetWindowPos() functions. I know how to use them correctly. However, what I am trying to accomplish is move a window slowly and smoothly as if a user is dragging it. I have yet to get this to work correctly. What I tried was getting the current coordinates with GetWindowRect() and then using the setwin...

How many CRITICAL_SECTIONs can I create?

Is there a limit to the number of critical sections I can initialize and use? My app creates a number of (a couple of thousand) objects that need to be thread-safe. If I have a critical section within each, will that use up too many resources? I thought that because I need to declare my own CRITICAL_SECTION object, I don't waste kerne...

How do I get the system proxy using Qt?

I have the following code that I am trying to extract the systems proxy settings from: QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::systemProxyForQuery(); foreach ( QNetworkProxy loopItem, listOfProxies ) { qDebug() << "proxyUsed:" << loopItem.hostName(); } I only get one item back and with a blank host name. Any ideas...

Using Pointer Returned from C Library in C++

Hi, I am using a library developed in C (particularly: HTK). I've made a bit modifications to source and trying to get a pointer (to beginning of a linked list) from a function. Not to go into too much detail; say I have a struct named OutType. In my C++ code I declare: OutType* Out; and pass it to some function LName(....., OutType* Out...

Macro use depending on integer

I have to use a macro multiple times inside a function and the macro that needs to be used depends on a number I pass into the function. e.g. function(int number) { switch(number) { case 0: doStuff(MACRO0); break; case 1: doStuff(MACRO1); break; } } The problem is: I have a lot stuff to do per switch s...

Socket Timeout in C++ Linux

Ok first of all I like to mention what im doing is completely ethical and yes I am port scanning. The program runs fine when the port is open but when I get to a closed socket the program halts for a very long time because there is no time-out clause. Below is the following code int main(){ int err, net; struct hostent *host; stru...

boost::regex segfaults when using capture

I get a seg fault for the simple program below. It seems to be related to the destructor match_results. #include <iostream> #include <vector> #include <string> #include <boost/regex.hpp> using namespace std; int main(int argc, char *argv) { boost::regex re; boost::cmatch matches; boost::regex_match("abc", matches, re.assi...

Using template parameter within a second template (STL container)

I'm a noob experimenting with templates and design patterns and would like to create an iterator pattern using a template argument ITEM. However, my private member var is a STL container that is itself a template, so how can I 'sync' the template argument of the STL container to that used by the class template? Here is the actual cla...

What is the equivalent (if any) to the C++/Windows SendMessage() on the Mac?

Is there an equivalent function to SendMessage in the Mac OS? ...

C++ and Web Development

Hi All, Rather weird to ask, but Java has an app server, I can develop web apps in Java using JSP and Servlets and also Swing apps, can use the same java routines my web apps use, etc, etc. I love C++ is there any way I can use C++ for web development? (Not a Microsoft path...). I would appreciate thoughts! -Jason ...

Unique hardware ID in Mac OS X

Mac OS X development is a fairly new animal for me, and I'm in the process of porting over some software. For software licensing and registration I need to be able to generate some kind of hardware ID. It doesn't have to be anything fancy; Ethernet MAC address, hard drive serial, CPU serial, something like that. I've got it covered on W...

fastest way to check if memory is zeroed

Hi, i got a program that needs to check if a chunk of a file is zeroed or has data. This alg runs for the whole file for sizes upto a couple of gigs and takes a while to run. Is there a better way to check to see if its zeroed? Platform: Linux and windows bool WGTController::isBlockCompleted(wgBlock* block) { if (!block) retu...

how to invalidate parent window without sending wm_paint to child window?

the parent and the child window is in the same size. and the the parent listens to the child's repainting when child repainting, the parent repainting. so I cannot use invalidate to clean the parent window, cos this will send wm_paint to child window, then a endless cycle. how can i clean up parent widnow without use invalidateRect,inva...