Questions for c++


c++ Why can't I pass up types CDC and CBitmap into another class's parameters?

I am trying to setup parameter from one class into another.

using a class defined in a c++ dll in c# code

I have a dll that was written in c++, I need to use this dll in my c# code. After searching I found that using P/Invoke would give me access to the function I need, but these functions are defined ...

Type Conversion/Casting Confusion in C++

Can somebody explain to me, what is Type Conversion and what is Type Casting? When should I use each of them? I'm sorry if this is an obvious question, but I'm new and come from a ruby background a...

OpenGL Application Code in relation to GLSL

I am having some difficulty understanding the connection between my OpenGL application and my GLSL files (.vert and .frag). I know how to create a vertex or fragment shader, and there is plenty of

How can i define an array of char* in a struct in a separate header file?

i'm just beignning to learn about structs and seperating things into different files.

How to attach to process using VC6 on win 2003?

The 'attach to process' dialogue box on VC6 running on win 2003 (I believe vista as well) has no processes to attach to in it... I've tried logging on as an administrator and running as an administ...

C++ API as an Python Extension Module

Can APIs written in C or C++ always be made into a library, given source code, and consequently be called from Python, due to the intrinsic callable nature of an API?

How do I perform a SHA512 hash in C++ WinRT?

What is the equivalent of the C# method SHA512CryptoServiceProvider.ComputeHash() in C++ WinRT?

Best form for constructors? Pass by value or reference?

I'm wondering the best form for my constructors. Here is some sample code:

Link C++ library to html front end

I do computational research with a C++/CUDA library that does intensive number crunching. Recently I was thinking to set up a little showcase of my library on my webpage where people could work

const and nonconst STL Iterators

What is the difference between a ::const_iterator and an ::iterator and where would you use one over the other?

Default vs. Implicit constructor in C++

This is very trivial, but Czech language (my native) doesn't distinguish between implicit and default, so I am confused by some Czech translations what is the difference between implicit and default

Using template in linked list

I came across this problem,, i need to implement a linked list, but the data type of element stored in the node may a string or a pointer to another class,

The effect of `basic_streambuf::setbuf`

My problem is as follows: Martin York claims in this, this, and this answers that one can make a stringstream read from some piece of memory by using basic_stringbuf::pubsetbuf like this:

Screen recorder

I'm interested in a library(for windows) written in Delphi/Pascal or C++ that allows me to record(to a video format) desktop screen, requirements:

OpenCV - is there anething like delete text?

I need such thing because it seems to me that when I do

Which On-Screen Keyboard for Touch Screen Application?

I'm developing an application in C++ that's partially driven by touch-screen on Windows XP Embedded. Some text entry will be necessary for the user. So far we've been using the standard Windows

error: ISO C++ forbids comparison between pointer and integer

here is some codes that I want to find the desired substring block in a string:

Conflicting Errors in Visual Studio (C++)

I have a function "PrintHeader" for my project, defined in io.cpp. Even though io.h is included in my main file, I get the error

What is a cryptic call stack?

I have taken programming classes before but never had I heard about a cryptic call stack. What is it?

How do I create a sqllite3 in-memory database?

One of the appropriate uses for sqlite3 is "in-memory databases". This sounds like a really useful tool for my C++ applications. Does anyone have an example of how this is done in C or C++? I'm

Minimizing memory usage of a breadth first search

In my the following code, I am traversing a graph through breadth first search. The code constructs the graph while it is traversing. This is a very large graph, with a fan out of 12. Due to this, ...

Visual Studio .NET 2003 - Ignore Specific Library for libcmt vs libcmtd

I have a template VS .NET 2003 project, which colleagues copy and customise when developing their software.

Multiplying two integers given in binary

I'm working on a program that will allow me to multiply/divide/add/subtract binary numbers together. In my program I'm making all integers be represented as vectors of digits.

Grammar of a C++ Translation Unit

My understanding, for a long time now, was that a C++ translation unit, after the preprocessor has run, is a sequence of declarations (let me remind that any definition is also a declaration).

Intercepting and hiding a window before it appears

I am developing a (in-process) plug-in to application and as part of my plug-in I want to replace the application's tool-tips with my own. However, there is no API available for me to do so, so I've

new/delete causes access violation

Ok, this is perplexing me... The code below is in a DLL, and when my console application calls this code it is suddenly throwing an access violation at the line delete[] lpBuffer. I have been using...

drag and drop of images using opengl c++

i want to create a game similare to this one

Define const object in a header file

I have a question concerning the const keyword in C++.

Exception elimination in C++ constructors

We have recently been faced with the problem of porting our C++ framework to an ARM platform running uClinux where the only vendor supported compiler is GCC 2.95.3. The problem we have run into is ...

How to get HWND in win32?

Is there way to get the HWND handler of my window?

C++ algorithm like python's 'groupby'

Are there any C++ transformations which are similar to itertools.groupby()?

Before smart pointers came into being

Before smart pointers (capable of taking ownership of resources in the dynamic region and freeing them after use) came into being, I wonder how bookkeeping on dynamically created objects was perfor...

Undefined behavior when exceed 64 bits

I have written a function that converts a decimal number to a binary number. I enter my decimal number as a long long int. It works fine with small numbers, but my task is to determine how the comp...

Reposition rectangle after zooming

I have a rectangle defined by R1:x1,y1-x2,y2 and after applying zoom, I get the

Why does this use of strtok() cause segmentation fault?

I am trying to get ALL tokens in a string using strtok() and convert them to integers. After getting one token, trying to pull another promptly segfaults - how do I tell the system that this is no...

what is the meaning of these linker errors?

I wish I could ask "What libraries do i need to link" but it's quite specific (wwise engine integration), so I need help in working it out myself. The problem occurs when I attempt to create a vari...

Can't find C++ 6.0 IDE in MSDN download area

I think this has something to do with a lawsuit with Sun over Java - but I can't verify this. I'm trying to get a legacy code base to compile 1st so I can begin upgrading it.

Why initializing data at global scope by passing it to some function is not possible?

I've been wondering for a while why initializing any data by passing it to some function is not permitted despite the fact that constructors that are a kind of function anyway can be called at global

How do I write this template specification when I'm outside the 'class' definition

This is something that I never ran into before. Say I have a class that looks like this:

problem with poco on snow leopard + eclipse

hey, i'm trying to work with poco on osx snow leopard, compiling via eclipse with the 64bit mac parser,

Deleting duplicates in an array (C++)

I saw an older post on here asking how to do relatively the same thing, but their approach was different and i'm interested to know the hole in my program.

Disable resizing of a form

I want to disable resizing my form - here is what I have tried.

Cannot find FREAK detector in OpenCV

I am developing some code in OpenCV 2.4 and I want to test the FREAK detector but I get compilation errors. I am including the feature2d.h, what can I do to fix this?

Undefined reference to a derived class

EDIT: RELATED TO c++ undefined reference to `vtable

C++: function creation using array

Write a function which has:

boost hash returning same value for different inputs

I have two objects, Account and Transaction where Transaction is the unique pair of Account and an incrementing id number. I want to use boost::hash to get unique values for these and have overloa...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.