c++

Removing the obstacle that yields the best path from a map after A* traversal

I traverse a 16x16 maze using my own A* implementation. All is well. However, after the traversal, I would like to find out what wall would give me the best alternative path. Apart from removing every block and re-running A* on the maze, what's a more clever and elegant solution? I was thinking give every wall node (ignored by A*), a t...

C++ : Math library that solve system of equations using back substitution algorithm

If I have this: A * f = g; A: upper triangular matrix (n x n) f: (n x 1) g: (n x 1) Need to solve for f using back substitution algorithm. I would say that it not really that hard to write one myself, but oh well, if there is a library out there, then why not. ...

write application event information with Win32 API

.NET provides EventLog class that be able to write application event information to a particular log on the system. Is there simliar Win32 API that can be called with C++? ...

dyanamic allocation on stack on run time

main() { int i=256; char buf[i]; } perfectly compile on g++ but gives an error on visual studio 8. anybody know why it is happening, Thanks ...

How can I refactor this to use an inline function or template instead of a macro?

Hello, everyone :) I have a useful macro here: #include <algorithm> #include <vector> #include <string> #include <boost/algorithm/string.hpp> #include <Windows.h> namespace Path { bool Exists(const std::wstring& path) { DWORD result = GetFileAttributesW(path.c_str()); return result != INVALID_FILE_ATTRIBUTES; } // THIS IS TH...

Why can't my program display this dialog box, while another program can?

I'm trying to write a wrapper for Winamp input plugins and have hit a bit of a snag. I'd like my wrapper to be able to display a plugin's configuration dialog, which is (or should be) achieved by calling the plugin's Config(HWND hwndParent) function. For most plugins, this works fine and my program is able to display the plugin's confi...

how to solve unhandled exception error when using visual C++ 2008?

Hi, Could someone please help me to solve unhandled exception error when using visual C++ 2008? the error is displayed as follow: Unhandled exception at 0x00411690 in time.exe: 0xC0000005: Access violation reading location 0x00000008 Some details: - tm 0x00000000 {tm_sec=??? tm_min=??? tm_hour=??? ...} tm * tm_sec CXX0...

What is the problem with my LinkedList class?

class LinkedList { private: int data; LinkedList *ptr; public: LinkedList(int i_data) { data = i_data; ptr = 0; } ~LinkedList() { delete ptr ; } void insert(LinkedList *node) { while(this->ptr!= 0) this = this->ptr; this->ptr= node; } } I will be crea...

How to use unnamed function arguments in C or C++

How do I use function arguments declared like void f(double) { /**/ } if it is possible? ...

WBEM/CIM calls to fetch linux OS information

I am trying to get operating system information , is it possible to get through WBEM or CIM client APIs for linux system? ...

Calendar control GUI C++ library

Who knows a good component for a "calendar control" (NOT date/time picker)? "Calendar control" means something like Mozilla Sunbird: Requirements to the control: - C++; - Day/Week/Month view; - Support of several calendars; - Without MFC dependences; Nice to have: - Open source; - Cross plathform; - Free; - Minimum external dependen...

Strange behaviour with fputs and a loop.

When running the following code I get no output but I cannot work out why. # include <stdio.h> int main() { fputs("hello", stdout); while (1); return 0; } Without the while loop it works perfectly but as soon as I add it in I get no output. Surely it should output before starting the loop? Is it just on my system? Do I...

Discrete Curve evolution algorithm

i am trying to implement discrete curve evolution algorithm in c++ do any one help me with psudo code or c code or some simple steps of your understanding ...

How do I "unzip" a gzipped stream while reading it

My program is using HTTP to read gzipped files over the network. I need my program to be able to unzip the content and parse it even when not all the gzipped file arrived yet. Can it be done ? If so, can it be done in C++ ? If so, how ? ...

How to link Poco library(libraries) to our program in unix environment

Hi, i'm having trouble with Poco libraries. I need a simple solution to make the compilation easier. Is there any pkg-config file for Poco library to use it into our make files? Or any alternative solution? Currently i use Ubuntu gnu/linux. ...

Devenv.exe with /I and whitespacess

Hey folks, I've tried to compile an application with Directx. But this causes an PRJ0030 error for $(). How can I escape critical characters like (,) or blanks. Refering to the cmd I've used ^ but it does not help. Kind regards, Gerrit ...

File with .cpp,v extension

Hi I 've a c++ code. but its with .cpp,v extension. I want to debug and compile the code. Can anyone please throw some light on that topic. I want to know what v indicates? & how to debug the code? ...

Calling msi file in c from CreateProcess

Is there any option to call msi file from CreateProcess in c language in window OS. ...

"preprocess current file" addin for Visual Studio? (C++ )

I realize that Visual Studio has the "/P" option to generate preprocessed files, but it's extremely inconvenient. I'm looking for an addin that allows you to right-click on a file and select "view preprocessed" - or any similar solution that would basically preprocess the currently-open file (with the appropriate options from the current...

Branchless memory manager?

Anyone thought about how to write a memory manager (in C++) that is completely branch free? I've written a pool, a stack, a queue, and a linked list (allocating from the pool), but I am wondering how plausible it is to write a branch free general memory manager. This is all to help make a really reusable framework for doing solid concur...