the develop environment is vs2008, the language is c++, when I release the problem,at beginning it run with out problem but after several minutes it stop and show error like that : HEAP[guessModel.exe]: Invalid Address specified to RtlFreeHeap( 003E0000, 7D7C737B ).
who can tell me the reason of the error. thank you very much.
...
I need to know of a way to prevent the user to 'open a new url' (with Ctrl-o) as soon as he has the focus on my sidebar (right-sided iframe).
In fact, my sidebar offers some controls and the user should not be able to 'navigate' to other website through the sidebar.
I'm using a bho in C++ using ATL(active template library), but maybe if ...
int * ref () {
int tmp = 100;
return &tmp;
}
int main () {
int * a = ref();
cout << *a << endl;
}
I know the function ref () is allocated stack space. It will get destroyed as soon as the function exits. So the complier will give warning information.
But my question is why the returning result is still correct.
...
Hi. Please see my code below.
ifstream myLibFile ("libs//%s" , line); // Compile failed here ???
I want to combine the path string and open the related file again.
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main () {
string line;
ifstream myfile ("libs//Config.txt");
// There are severa...
I'm looking for resources (preferably books, but websites are fine too) for using FFmpeg and/or SDL with C++.
Stuff I'd like to be able to do (eventually):
Decode and play videos in realtime to a QT widget (the QT part isn't a problem)
Overlay text and images on the video (in realtime)
Loop video
Cross-fade from one video to another (...
I am trying to understand functions returning a reference. For that I have written a simple program:
#include<iostream>
using namespace std;
class test
{
int i;
friend test& func();
public:
test(int j){i=j;}
void show(){cout<<i<<endl;}
};
test& func()
{
test temp(10);
return temp; //// Address of temp=0xbfcb2874
}
...
Hello, here is the code for my question:
class ICommon
{
public:
virtual ICommon
};
class CSpecial : public ICommon
{
public:
CSpecial
}
};
CSpecial obj;
Basically: I want the interface ICommon to force it's descendants to implement = operator but don't want to have any typecasts in the implementation. The compiler says "can't ...
following piece of code does not compile, the problem is in T::rank not be inaccessible (I think) or uninitialized in parent template.
Can you tell me exactly what the problem is?
is passing rank explicitly the only way? or is there a way to query tensor class directly?
Thank you
#include <boost/utility/enable_if.hpp>
template<cla...
Does anyone know where or how to obtain a C++ example to create iPhone apps? What I am looking for is just using C++ (no objective-C or just the bare essential objective-C) and no interface builder, source only.
Can ayone help me locate such a beast?
...
Hello there,
It's been days for me trying to display a BMP image from memory in a wxWidgets dialog, but none of my tries succeed.
First, I tried to create a wxStaticBitmap control in my dialog:
// in class declaration inside header file
wxStaticBitmap *ibitmap;
// in wxDialog constructor
// MyLogo is an array of `unsigned char`
// ...
Hey guys,
I would like to write a small C++ app and run it on chrome using the native client API.
I have a few questions though:
1) I compiled the examples on Ubuntu and ran the code on firefox but can't run it on chrome (using version 5.0.342.7 beta)
Do I need to install something? An extension/plugin?
2) I can't find a single onli...
I always thought that when declaring an array in C++, the size has to be a constant integer value.
For instance :
int MyArray[5]; // correct
or
const int ARRAY_SIZE = 6;
int MyArray[ARRAY_SIZE]; // correct
but
int ArraySize = 5;
int MyArray[ArraySize]; // incorrect
Here is also what is explained in The C++ Programming Language,...
Hey guys. Check out this piece of sample code.
#include "stdafx.h"
#include<conio.h>
#include<string.h>
class person{
private char name[20];
private int age;
public void setValues(char n[],int a)
{
strcpy(this->name,n);
this->age=a;
}
public void display()
{
printf("\nName = %s",name);
printf("\nAge = %d",age);
}
};
...
When I run a C++ program in Netbeans on a Mac that has cout or printf statements the output is displayed in a terminal opened using X11. Is there a console built into Netbeans? If yes, how do I change the output to it?
Thanks,
Spencer
...
hi
i am writing an application filter for ISA server . filter is registering and install in
ISA server but I can't debug filter and logs filter functions.
I wrote a function for log message in text file. any function from filter doesn't log in file . I think these functions do not call from ISA server.
how do i debug my dll and how...
I am using malloc_stats() to print malloc related statistics in which I am finding "Arena 0" for some programs and "Arena 0 and Arena 1" for some other programs.
What do these arenas represent?
...
I was wondering how to overload the == operator for a binary tree to compare if two trees have identical data at same nodes. So far this is what I have:
bool TreeType::operator==(const TreeType //two null trees are equal
else if((root != NULL) //one tree is null the other is not
}
//TREETYPE DECLARATIONS
struct TreeNode;
enum ...
Hi
I am a c++ programmer , I know little bit about java. I know that java programmers do not have to work with memory directly like C++. I also know that most crashes in C++ appliations are due to memory corruptions.
So can an application written in Java crash due to a memory related issue?
Thanks
...
generally we display webcam or video motion in opencv windows with :
CvCapture* capture = cvCreateCameraCapture(0);
cvNamedWindow( "title", CV_WINDOW_AUTOSIZE );
cvMoveWindow("title",x,y);
while(1)
{
frame = cvQueryFrame( capture );
if( !frame )
{
break;
}
cvShowImage( "title", frame ...
Learning C++ and see the class laid out like this:
class CRectangle {
int x, y;
public:
void set_values (int,int);
int area () {return (x*y);}
};
void CRectangle::set_values (int a, int b) {
x = a;
y = b;
}
I know Java and methods(functions) in Java are written within the class. The class looks like a Java interface...