Is there any way to force visual studio to link all symbols from a lib file into the dll as atm it is optimizing "unused" functions which are needed by the program using the dll at run time.
I tried using the /OPT:NOREF and /OPT:NOICF but they dont seem to work.
The reason i need them is because they are global class which register th...
Is there a semaphone that works like a Chess timer, meaning;
Thread A completes its task, loops back up to the top and calls the Semaphore
This triggers Thread 2 which proceeds through its code, loops back up to the top and calls the Semaphore
This triggers Thread A which...
So the Semaphore is both blocking and signaling.
I know I ...
Hi,
I wrote this code in Processing (www.processing.org) and was wondering how would one implement it using C++?
int i = 0;
void setup()
{
size(1000,1000);
}
void draw()
{
// frameRate(120);
PImage slice = get();
set(0,20,slice);
if( i % 2 == 0 ) fill(128); else fill(0);
i++;
rect(0,0,width,20);
}
As you can see this...
Hy my name is Joey and i would like to know if there is a way to use speech in C++ if so can someone point me to references and books deeply appreciated...
...
I decided to familiarize myself with wxWidgets today.
I downloaded version 2.8.9 (current release), and compiled the library in all the desired modes.
I am able to build/run the samples that ship with wxWidgets out of the box.
However, when I compile with /Za (i.e., language extensions disabled), I get over 100 build errors on even the ...
Hi,
I'm working on my first XPCOM component. Unfortunately, I can't register it successfully.
Building is ok. Here's the makefile
CXX = g++
CPPFLAGS += -fno-rtti \
-fexceptions \
-shared \
-fshort-wchar
# Change this to point at your Gecko SDK directory.
GECKO_SDK_PATH = /path/to/gecko/sdk
# GCC onl...
I'm using SOIL in my project, and I need to take in a single texture, and than convert it into an array of textures using different parts of the first texture. (To use a sprite sheet).
I'm using SDL and OpenGL by the way.
...
I've been programming for a while but It's been mostly Java and C#. I've never actually had to manage memory on my own. I recently began programming in C++ and I'm a little confused as to when I should store things on the stack and when to store them on the heap.
My understanding is that variables which are accessed very frequently shou...
In fact i am trying to calculate the time a function takes to complete in my program.
So i am using the logic to get system time when i call the function and time when the function returns a value then by subtracting the values i get time it took to complete.
So if anyone can tell me some better approach or just how to get system time at...
Hi. I'm trying to build a project in Visual Studio 2008. I'm getting a bunch of linker errors that are really bothering me. My application is a Win32 console application using only native ANSI C++.
They are all linker errors of the same pattern.
Linker errors are related to every single private static data member of classes I have defin...
I've learned the essentials of C++ and would like to learn Visual C++ (VC++)
I want to be master in native , MFC and .NET for Windows programming. I already bought a book on VC++ by Ivor Horton. But the language seems hard to understand.
Does anyone have any better book recommendations?
...
Is it OK to have a static member variable defined in a base class, and having several derived classes each using its own instance of this member variable?
The following code compiles successfully, and prints the right output, but I am still not sure that doing something like that is a good practice. In the following example, how can it ...
I've got a static map of identifier<=>struct pairs, and each struct should contain some arrays. Everything is known at compile time. That is, I want to have something like this here:
ID1 => name: someString
flagCount: 3
flags: [1, 5, 10]
statically created (if possible). Of course, a declaration like:
struct Info
{
...
Hi,
i came across a function definition:
char* abc(char *f, ...)
{
}
i am finding it hard to know how this code is working...
what do the three dots mean??
Thanks.
...
Question:
Based on a CLSID, how can I find out what objects (or interfaces) it supports for IClassFactory::CreateInstance
Note:
Currently using CLSIDFromProgID to obtain CLSID
...
well is there? by string i mean std::string
...
Is there a function for FILE (fopen?) that allows me to just read one int from a binary file?
So far I'm trying this, but I'm getting some kind of error I can't see cause the program just crashes without telling me.
void opentest()
{
FILE *fp = fopen("dqmapt.mp", "r");
int i = 0;
int j = 0;
int k = 0;
int * buffer;
...
The "method" implementation says istringstream get
int get();
Extracts a character from the stream and returns its value (casted to an integer).
I wanted to see its implementation.
Edit:Removed the part which I am trying to port
...
I need to designe predicate for stl algorithms such as find_if, count_if.
namespace lib
{
struct Finder
{
Finder( const std::string& name ):
name_( name )
{
}
template< typename TElement >
bool operator( const TElement& element )
{
return element.isPresent(...
I have two threads that use an event for synchronization.
In each thread they use the same call:
::CreateEvent( NULL,TRUE,FALSE,tcEventName )
The producer thread is the one that makes the call first, while the consumer thread makes the call last, so it's technically opening, not creating the event... I assume.
But, when SetEvent is c...