c++

Filtering Eclipse's C++ Content Assist

I'm using Eclipse Ganymede (version 3.4.1) with a C++ project. Is there some way to filter the content assist list to only show methods and fields that are available in the current context? If not, why not? Is there ever a situation where I would want to access the private fields, etc. in an object? ...

Mac OS X equivalent for TerminateProcess(GetCurrentProcess,0);

I am looking for a simple and uncatchable way to terminate the Mac port of my C++ application. In Windows I was using TerminateProcess(GetCurrentProcess, 0); What's the equivalent command I can use with Mac OS X / XCode / GCC? ...

What's the best way to parse RSS/Atom feeds for an iPhone application?

So I understand that there are a few options available as far as parsing straight XML goes: NSXMLParser, TouchXML from TouchCode, etc. That's all fine, and seems to work fine for me. The real problem here is that there are dozens of small variations in RSS feeds (and Atom feeds too), so supporting all possible permutations of feeds avai...

How to compile windows base program with eclipse cdt(using VIsual Studio compiler)

i'd like to compile (debugging if possible) windows program in eclipse cdt with microsoft copmiler. It's better to support eclipse tool-chain (in eclipse cdt) It's impossible to find this solution in google, except using mingw's make and Visual Studio Makefile.. Are there anyone to have solution with this problem? ...

msxml removes line breaks in CDATA section

I have a simple XML with a CDATA section like: <?xml version="1.0" encoding="ISO-8859-1" ?> <config> <input> <![CDATA[ line another line and another ]]> </input> ... </config> And I have the current code for parsing the CDATA section using MSXML. for (int i = 0, count = pChildNodes->Getlength(); i < count; ++i) { ...

Checking Internet Explorer protected mode

I have several question : 1) As I know function IEIsProtectedModeProcess used from within IE extension Is there way to know programmatically whether Internet Explorer run in protected mode outside of IE ? Thanks ...

How to find the cause for a USER 44 PANIC?

One of the products we develop is a phone app for nokia phones done in C++ and Symbian, we started getting "random" crashes a while a ago with a USER 44 panic. I am pretty new to the symbian environment so I am looking for tools and recommendations to help finding the root of this bug. Is there a equivalent of a "stack trace" that I c...

How to reach iteratively few variables which names differ only by number in C++?

I need a method helping me, to reach variables named like "comboBox1", "comboBox2" etc each by each in a loop. I'd like to change code like: //proceed comboBox1 //proceed comboBox2 //proceed comboBox3 //proceed comboBox4 //proceed comboBox5 //proceed comboBox6 Into: for (int i = 1; i < numberOfBoxes; i++) { //proceed comboBox(i) ...

Sending arbitrary data through several functions

While making a state system that follows the state design pattern (which is working quite well so far) and I am now wondering if there is a way to send arbitrary data to this system. I was thinking that this might be possible using a Stimulus class. The system itself is composited into another object that can respond to the stimuli, an...

public inheritance and tlb files

Say you have two assemblies (two dlls). The first contains a class called Base and the second contains a class called Derived which publicly inherits from Base. When I use the tlb files to create C++ classes in Visual Studio 2005, I get Base and Derived classes, but one is not a subclass of the other. There doesn't seem to be any IS-A ...

C++ linker problem with wrapper

I have a library opengl.lib which contains wrapper functions to all opengl functions. The functions are declared in their own namespace so that the wrapper functions can be named with the same name as the opengl functions. So inside a wrapper function, opengl function is called with ::gl***(); opengl.h: namespace OpenGL { void glFun...

Learning C++ Language

I am a .net c# programmer but I want to learn .NET C++ also. I am a beginner for c++. Is there any site, book, or Video Tutorials from beginner to expert? ...

c++ unable to find operator via implicit conversion?

When writing a class to act as a wrapper around a heap-allocated object, I encountered a problem with implicit type conversion that can be reduced to this simple example. In the code below the wrapper class manages a heap-allocated object and implicitly converts to a reference to that object. This allows the wrapper object to be passed ...

Online compilers/runtime for Java, C++, Python and ObjC?

Does anyone know of a good online compiler/runtime (for C++, Java, Python, ObjC etc.) that I can access on the web? What I'm looking for is something that would allow me to type in a program in a web form and to run the program and see the results online. (Let's not get into the why for now. Suffice it to say for the moment that I don...

Help with C++ preprocessor compilation errors

Please look at the following file: (it is a complete file) #ifndef TEES_ALGORITHM_LIBRARY_WRAPPER_H #define TEES_ALGORITHM_LIBRARY_WRAPPER_H #ifdef _TEES_COMPILE_AS_LIB #include <dfa\Includes\DFC_algorithms.hpp> #include <DFA\FuzzyClassifier\FuzzyAlgorithmIntialization\InitFuzzyAlgorithm.hpp> typedef teesalgorithm::tees_fuzzy_algorithm...

C++: Big Integers

I am a writing a lexer as part of a compiler project and I need to detect if an integer is larger than what can fit in a int so I can print an error. Is there a C++ standard library for big integers that could fit this purpose? ...

Nested Template Specialization

Having a brain fart... Is it possible to make something like this work? template<int a> struct Foo { template<int b> struct Bar; }; template<int a> struct Foo<a>::Bar<1> //Trying to specialize Bar { }; I don't have to do this, but it will allow me to nicely hide some implementation details from namespace scope. Suggestions appre...

dividing two Ints inside a double variable in C++

I am working on a lab for school that runs 10 trails of 10000 5 card hands , I have to find flushes and pairs in each hands. I have to find the percentage of pairs and flushs per trail. my problem is when I try to get the percentage of a pair of one trail for example double percent = total_pairs/10000; or double percent = 5600/10000...

C++ QUESTION: argv[1] to function()

What exactly do i need to do to get the contents of argv[1] to a function that uses no paramaters? How does this work? I'd really ( really ) like to know! const char *cPtr = argv[1]; and pass it to someFunction() that takes 0 arguments! Is this possible? ...

c++ outputting and inputting a single character

I am writing a program in c++ which implements a doubly-linked list that holds a single character in each node. I am inserting characters via the append function: doubly_linked_list adam; adam.append('a'); This function is implemented as follows: //Append node node* append(const item c){ //If the list is not empty... ...