c++

Crash when using C# Assembly from Managed C++ DLL

Hi, On a Windows XP system, I'm writing a Mangaged C++ library which calls code in a C# Assembly. Unfortunately, as soon as I start referencing a symbol in the C# Assembly, running the Managed C++ library fails with this error (I copied this from the XP crash dialog): EventType : clr20r3 P1 : treeviewdemo.exe P2 : 0.0.0.0 P3 : 4a5d6d62...

MSVCP90.dll not found?

Hi, in my project if compile project in release, it asks me MSVCP90.dll. if it is debug, it does not... have you ever met such a situation? and do you know why this .dll is desired? or what configuration makes it to be desired? thanks for any advice.. ...

Is there any user-mode multi-threading library/framework for C++ under Linux?

I am looking for user-mode multi-threading library/framework for C++ under Linux. I am familiar with boost::thread and ACE_Thread_Manager but AFAIK both of them eventually use OS native thread's support. Suggestions will be highly appreciated. ...

Put A String In A ifstream Method

Hello, I'm learning C++ and i'm getting some troubles when i'm trying to use a String in a ifstream method, like this: string filename; cout << "Enter the name of the file: "; cin >> filename; ifstream file ( filename ); Here is the full code: // obtaining file size #include <iostream> #include <fstream> using namespace std; int...

class_id in boost::archive::xml_oarchive

Is it possible for XML serialization to use more human friendly class_id as GUID, described using BOOST_CLASS_EXPORT_GUID ??? Consider serializing class: SomeClass* b=new SomeClass("c"); { boost::archive::xml_oarchive oa(cout); oa.register_type<SomeClass>(); oa << boost::serialization::make_nvp("b",b); } Output will be li...

abstract operator + ?

Hi all. I've got a class : class base { public : base & operator +=(const int value) = 0; // base operator + (const int val) = 0; // HOW DO I DO THIS ? }; And a child class that derives from it class derived : public base { public : derived() : m_val(0) {} derived(const derived & val) : m_val(val.m_val) {} base & operator = (co...

Constructor of class in template

I have a object cache class like this: #include "boost/thread/mutex.hpp" #include "boost/unordered_map.hpp" template <typename type1, typename type2> class objectCache { public: objectCache() { IDCounter = 0; } ~objectCache() { for ( it=free_objects.begin() ; it != free_objects.end(); it++ ) delete (...

Decompression and extraction of files from streaming archive on the fly

I'm writing a browser plugin, similiar to Flash and Java in that it starts downloading a file (.jar or .swf) as soon as it gets displayed. Java waits (I believe) until the entire jar files is loaded, but Flash does not. I want the same ability, but with a compressed archive file. I would like to access files in the archive as soon as the...

How to use WINDBG debugging tool for debugging??

Hi Can any one tell me how to use the WinDbg . I am created an Application it is works fine in one machine.when i try to run on another machine it fails how can i debug it using windbg. ...

C++ container of iterators and circular references

I'd like to create two containers that contain iterators to each other. I'd like to do this hopefully without introducing any intermediate/indirect types. Is this possible or do iterator types depending on knowing the size of the container's data type? Here is some sample code that I'd like to get compiling: #include <map> #include <de...

C++ IDE on Linux

Hi, We trying to choose an IDE for C++ development on Linux. The proposed options are KDevelop and Eclipse. Eclipse is highly customizable, but Java centric and heavy. KDevelop is bounded to particular KDE (I believe because KDE API) and can not be replaced if required. What you use and why? Thanks Dima ...

Header files dependencies between C++ modules

Hi, In my place we have a big C++ code base and I think there's a problem how header files are used. There're many Visual Studio project, but the problem is in concept and is not related to VS. Each project is a module, performing particular functionality. Each project/module is compiled to library or binary. Each project has a directo...

What happens when you use C++?

I'm just being introduced to C++, and want to know a basic question.... What happens when using C++? Is there anywhere I can see a working example? Textbooks break it down, segment by segment. I would really like to SEE what happens. ANY suggestion would be appreciated. Hope MY question is not too vague. Thanks! ...

Not receiving callbacks from the Java Access Bridge

I'm trying to use the Java Access Bridge to get information about Swing components from inside a C++ app. However, none of the callbacks I register ever get called. I tried enuming the windows an then calling IsJavaWindow() on each handle, but it always returns false. Any ideas on why it apparently is not working? I presume it's a pr...

C++ w/ static template methods

Template methods as in NOT C++ templates. So, say that you would like to do some searching with different algorithms - Linear and Binary for instance. And you would also like to run those searches through some common routines so that you could, for instance, automatically record the time that a given search took and so on. The templ...

Reading .docx in C++

I'm trying to create a program that reads a .docx file and posts it content to a blog/forum for personal use. I finally have figured out how to use libcurl to do (what I figured) was the harder part of the program. Now I just have to read the .docx file, but have come under a snag. I can't seem to find any documentation on how to do t...

Makefile, source in multiple directories, dependency problem

I am experimenting with makefile...mainly when sources are in many directories I have following situation... project/src/ contains directory A, B, Main Directory A contains A.h and A.cpp; B contains B.cpp and B.h; and Test contains test.cpp A.cpp includes A.h; B.cpp includes B.h and Main.cpp includes A.h, B.h project/lib contains li...

Compiler for Windows Mobile OS

I am looking for compilers ( command line / IDE ) that runs on Windows Mobile OS v6 for the following languages: C/C++ Java ...

Free Testing / Code Coverage systems for C++

I'd like to start using a Test Driven Development system for a private project since I saw my employer using it and realized it was very useful. My employer's project was in C# but mines are in C and C++. I looked around and saw that several packages exist for both Java and .NET (for example: NCover, NUnit, ...). Unfortunately I found i...

What happens if I cast a double to an int, but the value of the double is out of range?

What happens if I cast a double to an int, but the value of the double is out of range? Lets say I do something like this? double d = double(INT_MIN) - 10000.0; int a = (int)d; What is the value of a? Is it undefined? ...