c++

c++ library for html formating

hi i need c++ library for formating html on linux,tidy html is not working for me ...

Selecting a Build Server

I'm planning to setup my own build server. I'm primary building C#, C/C++ and Java projects. I would also like my build server to run some external programs/scripts such as my unit tests, code static analysis and doxygen. Suggestions? ...

A puzzle for template wizards

I'd like to do the following: const int someInt; const std::vector<int> someIntList; const std::vector<std::vector<int>> someNestedIntList; Marshall(someInt); // trivial case Marshall(someIntList); // difficult case Marshall(someNestedIntList); // difficult case I tried the following: template<std::vector<class Element>> void Marsh...

what makes const at the lower levels of the machine?

When making something const in C++ what makes it that you cannot for example implicitly pass it a non-const at the lower levels of the machine? How is it determined by the machine that this is const? (besides the fact that const means what it means...) Is it perhaps stored in the .rdata section of memory or is there a bit that gets se...

Obtain a list of partitions on Windows

Goal I'm porting a filesystem to Windows, and am writing a more Windows-like interface for the mounter executable. Part of this process is letting the user locate a partition and pick a drive letter. Ultimately the choice of partition has to result in something I can open using CreateFile(), open(), fopen() or similar. Leads Windows s...

load dlls at runtime for 32 bit and 64 bit

Hi, I need to load dlls at runtime for 32 bit and 64 bit. how do i determine 32bit and 64bit. Thanks, kam ...

How to get drive letters which are not in use in system in MFC ?

hi, How to get drive letters which are not in use in system in MFC ? Thanks. ...

const_cast and UB

$5.2.11/7 - "[Note: Depending on the type of the object, a write operation through the pointer, lvalue or pointer to data member resulting from a const_cast that casts away a const-qualifier68) may produce undefined behavior (7.1.5.1). ]" The wordings of this section (C++03) are surprising to me. What is suprising are tw...

Affectations and exceptions

Lets consider I have the following function: SomeType createSomeType(); which can throw depending on some reasons. Then: SomeType val = SomeType(); // initial value try { val = createSomeType(); // here } catch (std::exception&) { } If createSomeType() throws, can I always assume that val value is unchanged ? ...

C++: Resize an image

Hi guys, I have an image which is representative of an Array2D: template<class T = uint8_t> Array2D<T> mPixData[4]; ///< 3 component channels + alpha channel. The comment is in the library. I have no clues about the explanation. Could anybody please help me to? Explain what are the 3 component channels + alpha channel are about? ...

C++ input question

Hello! I am attempting to build a small local-purpose 3d engine, which has to be platform-independent and right now I'm looking for a way to handle different possible types of user input. This, obviously, includes mouse / keyboard events and possibly, another analogue controllers (joysticks, for example). I can think of several ways to...

wxDialog with the wxMenuBar

I have tons of existing code using wxWidgets. The main window is wxDialog. Now I have to add a wxMenuBar to that dialog. But, in order to do it, the window should be derived from wxFrame. Is it possible to add a wxMenuBar to the wxDialog? If not, is it possible to convert existing code in a way that main window is derived from wxFrame i...

Compiling programme linux 32 bit vs 64 bit

I am new to this 32 bit vs 64 bit thing. I have written programme in C++ in linux. I am wondering what determine the programme is 32 bit or 64 bit? This is because I compile the programme from a makefile written by others. How could I check it and how could I modify it to 64 bit? Thanks. ...

LabView: How to pass in parameters to .NET method using "Invoke Method" vi?

I have a .NET class library that I wrote in C++. "public ref class MyClass" defines a method "MyMethod" that takes two System::Int32 parameters. Here is MyClass first then my question: namespace MyNetAssembly { public ref class MyClassThatDoesStuff { public: MyClassThatDoesStuff(); void MyMethod(System...

Optional method arguments in C++, but from the callee's side?

In C++ methods can have optional arguments, like this: void myFunction (int arg1, int arg2=0); In this case myFunction can be called with 1 integer or with two. If you omit the second integer, the value 0 is passed instead. I am now looking for ways to obtain the same functionality, but from the callee's side. Suppose I have an int...

Why am I getting zero?

In this code (ready to compile): #include "stdafx.h" #include <iostream> #include <sstream> using std::cout; template<class T, int first, int second> T make() { T result = T(); std::stringstream interpreter; interpreter << first << '.' << secon...

In C++, can I represent a class type as a variable?

I would like to call a static method from a class that I'll determine at run-time, but which I know subclasses a given class. So let's say I have these classes class super { public: super(); static super *loadMe (ifstream &is); } class subA : public super { public: subA(); static super *loadMe (ifstream &is); } c...

In search for tutorials for Corba with C++

Hi, i am looking for an online tutorial in Corba and working with C++ especially. I tried to search on the internet but can't find any good ones. I am not restricting to just tutorials. Any online guide, step-by-steps would be helpful too. any assistance would be greatful thanks. ...

P/Invoke C# to C++

Hi, I'm trying to learn how to run C# and C++ code together using Mono on RedHat. I'm fooling around in order to learn how to get the two to interoperate together in order to be a bit more educated when I work on a larger project. I've got a problem that I'm making a P/Invoke call from the C# to my C++ code and an exception is being th...

Error: the global scope has no GetUrl

Hi guys! I have a new problem with my C++ DLL... I have tried exporting the entire class instead of only one method. But the program doesn't want to compile now because of that the global scope has no GetUrl Here is my "UrlConnector.h": #define ConnectMe __declspec( dllexport ) namespace ConnectHttps { class ConnectMe { void GetUr...