Questions for c++


1214

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.
5643

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 ...
2444

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...
3965

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
6340

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.
586

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...
9404

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?
9055

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

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

Best form for constructors? Pass by value or reference?

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

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
2562

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?
8398

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
3339

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,
4709

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:
8287

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:
2014

OpenCV - is there anething like delete text?

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

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
6143

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:
9554

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
9270

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?
6471

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
4806

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, ...
6333

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.
4604

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.
3516

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).
5328

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
8502

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...
4204

drag and drop of images using opengl c++

i want to create a game similare to this one http://www.sciencekids.co.nz/gamesactivities/movinggrowing.html
2928

Define const object in a header file

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

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 ...
5144

How to get HWND in win32?

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

C++ algorithm like python's 'groupby'

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

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...
7041

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...
8682

Reposition rectangle after zooming

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

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...
2430

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...
3649

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.
3242

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
5649

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:
4619

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,
181

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.
9960

Disable resizing of a form

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

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?
3668

Undefined reference to a derived class

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

C++: function creation using array

Write a function which has:
7921

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...