I get a heap corruption error when deleting a pointer. For this project, the linking parameter for Randomized Base Address is set to Disable Image Randomization. Not sure why that is set that way. Anyway, I only get that error when a specific header file of a library is included. The strange thing is that even with that header file inclu...
Is there a way to set the background color. I thought of making a dummy window and then using TBSTATE_TRANSPARENT, but I thought there might be a cleaner solution?
Thanks
None of these solutions work for a toolbar using visual styles
...
I have a large makefile which builds several libraries, installs them, and then keeps on building objects which link against those installed libraries. My trouble is that I want to use "-lfoo -lbar" as g++ flags to link against the two installed libraries, but the dependencies get messed up. If I change a header "42.h" which the librar...
Hello,
I have some code to handle resource (images, fonts, mesh data, etc.) management using a template'd static class, allowing client code to do something like:
ResourceManager<Texture>::init("data/textures");
ResourceManager<Font>::init("data/fonts");
// later ...
boost::shared_ptr<const Texture> tex = ResourceManager<Texture>::getR...
Hello I've been trying to use a cursor with embedded sql in c but I can't seem to get it to stop reading the last row in my table. The table is called publication with two attributes pubid and title. I just want my cursor to iterate through and display the pubid.
This is what i have:
EXEC SQL DECLARE C1 CURSOR FOR SELECT pubid FRO...
i'm currently using binary files for quick access to custom objects stored in multidimensional arrays which are saved to file as object arrays. so far, reading from file hasn't been too much of a problem since i've been reading the array into an identical object array on the stack. it looks something like this:
Foo foo[5][10];
ifstream ...
Like the title says, I'm looking for some kind of data structure which will allow me to store any type of class into it that I need at the time. For example:
Foo *foo = new Foo();
Bar *bar = new Bar();
someContainer.push_back( foo );
someContainer.push_back( bar );
someContainer.access( 0 )->doFooStuff();
someContainer.access( 1 )->doBa...
Hi,
I have a std::vector that holds a Point struct (x,y,z and some other non-pointer types).
These points are control points for drawing a bspline curve. I'm not having trouble drawing the curve, but complications arise when I have to close the curve, which involves adding control points (alredy existing inside the container) in certai...
Where should I store the application installation folder for application to reffer ?
...
Hello everyone.
I was wondering about the standard C libraries that contain all the functions/definitions like abs(), cout streams, printf, etc.
I'm familiar with the header files (stdio.h, cmath.h, time.h, etc etc) but there doesn't seem to be any corresponding .lib or .dll anywhere (ie. stdio.lib, time.dll, etc).
Where is the actual...
Unhandled exception at 0x00423e3b in memory_manager.exe: 0xC0000005:
Access violation reading location 0x00000004.
Souce file Download: http://www.cppblog.com/Files/mymsdn/memory_manager_bug_vs2008_debug.zip
Hey,
I am trying create a memory manager function to resolve some problem:
reference count the new / delete counter when a...
Here is some sample code explaining what I am trying to achieve.
Basically, I have an algorithm that depends on some basic operations available in a class. I have defined those operations in a pure abstract base class. I want to apply that algorithm to a variety of objects that provide those operations by deriving classes for the specif...
Hi, I looking for cross platform multithread message queue implementation on c++ (not slot/signal) . Better if it based on subject-observer pattern.
...
I am considering switching a cross platform project from separate build management systems in Visual C++, XCode and makefiles to CMake.
One essential feature I need is to add automatically all files in a directory to a target. While this is easy to do with make, it is not easily doable with Visual C++ and XCode (correct me if I am wrong...
Greetings ,
I my QT application,I have a base class as follows.I am using QObject because I want to use Signal-Slot mechanism in all derived classes.
class IRzPlugin : public QObject {
public:
virtual void registerMenu(QWidget*);
virtual void execute();
}
Then I have another class as follows.I need to extend from QWidget because...
i know what this means
#define M(B) (1U << ((sizeof(x) * CHAR_BIT) - B)) // CHAR_BIT=bits/byte
but i dont understand well this one
#undef M
after this what happens? M is cleared or deleted or?
...
Hello,
I am trying to run a program, that encrypts and decrypts using AES.
(from http://www.codeproject.com/KB/security/AESProductKey.aspx )
// From aestest1.cpp
// Runtime Includes
#include <iostream>
#include <iomanip>
#include <fstream>
#include <vector>
#include <string>
#include "stdafx.h"
// Crypto++ Includes
#include "cryptlib...
Hi, I have file of 3T in .gz format. I want to read it line-by-line in a C++ program without actually decompressing. Can any one post a simple example of doing it?
...
Hi,
I've got a class A, which consists of objects B and C. How to write a constructor of A that gets B and C objects? Should I pass them by value, by (const) reference, or a pointer? Where should I deallocate them?
I thought about pointers, because then I could write:
A a(new B(1,2,3,4,5), new C('x','y','z'))
But I don't know whethe...
Possible Duplicates:
Could anyone explain these undefined behaviors (i = i++ + ++i , i = i++, etc)
How do we explain the result of the expression (++x)+(++x)+(++x)?
Why does the following program print 10? Isn't it supposed to print 12?
int j=2;
j = j++ * ++j;
printf("%d", j);
...