23 Discussion / Question Topics

Remove Filter
Member Avatar for death_oclock

So I have a table containing various software and a table containing various features. Each software entry need to have a list of features. Here's where it gets tricky: In my application, I need to be able to select a software entry if it has all the features in a …

Member Avatar for death_oclock
0
124
Member Avatar for death_oclock

I just wrote a program that plays various drum sounds when certain keys are pressed. It works for the most part but, when two keys are pressed at the same time, only one sound plays. Both key presses are received, however. I am using the Clip class which allegedly supports …

0
55
Member Avatar for death_oclock

I'm not all that familiar with the C syntax rules, I've mostly worked with C++, and I'm having some weird problems working with Visual C 2008. Here's my code: [CODE=c]#ifndef IFF_H #define IFF_H #include <stdio.h> #include <stdlib.h> #define IDS_GROUP "" #define IDN_GROUP 1 #define IDS_CAT "cat " #define IDN_CAT 2 …

Member Avatar for HHBones
0
222
Member Avatar for death_oclock

I can't find, within my project directories, any option to specify where I want my .exe to start in. I want to do this for that sake of .dll and other file references. Any help?

Member Avatar for jakesee
0
104
Member Avatar for death_oclock

I'm getting an error (unhandled exception writing address so and so) trying to modify a string. It gets weirder though. Let me show what i've got: --Main.c-- [CODE=C]#include "stdafx.h" #include "commands.h" int main(int argc, char* argv[]) { char word[256]; int id; strcpy(word, "move"); strToUpper(word); printf("%s", word); id = getCommandId(word); if(id …

Member Avatar for death_oclock
0
194
Member Avatar for death_oclock

I have designed my page using Firefox and it looks exactly as I would expect it to, colors consistent with my design using Photoshop. When I view the page in Internet Explorer, all the colors are changed. It looks as if everything has a slight gray layer over it making …

Member Avatar for death_oclock
0
147
Member Avatar for death_oclock

I need to have my background image span the entire length of the page without using the BODY element, here's why: I separated the image into left and right sections so even for different resolutions, the left image will always be on the left, and same with the right. Because …

Member Avatar for MidiMagic
0
140
Member Avatar for death_oclock

Is there any way to force fwrite() to write in big-endian format no matter what? I am trying to write a MIDI file and they are always big-endian. Converting every value I write to big endian beforehand would be extremely tedious. Ideas?

Member Avatar for mcldev
0
853
Member Avatar for death_oclock

My program is getting hung up somewhere in the function [ICODE]evolveRealization[/ICODE] and while it is stuck its memory usage is increasing by around 1MB per second! While it is building up generations, it was designed to only use the most recent one, and the old ones should be freed. So …

Member Avatar for Ancient Dragon
0
151
Member Avatar for death_oclock

I had forgotten about calloc for the longest time, but I was recently reminded of it. Now i'm curious, what would be the difference between [ICODE]malloc(numElems * elemSize);[/ICODE] and [ICODE]calloc(numElems, elemSize);[/ICODE]? If my knowledge of arrays is correct, there shouldn't be any difference in the memory allocated.

Member Avatar for death_oclock
0
136
Member Avatar for death_oclock

Visual C (2008) is acting as if I never included a header file (wave.h) that I am using, but the #include statement is definitely there. Here's my main (BPM analyze.c): [CODE=C]#include "stdafx.h" #include "common.h" #include "sound.h" #include "wave.h" int main(int argc, char* argv[]) { SAMPLE samples[2]; unsigned int i, j; …

Member Avatar for Aia
0
135
Member Avatar for death_oclock

I am making some software to analyze digital sound data. My first step is to find where all the attacks are, or where the starts of notes are. I want to find where there is a significant increase in volume, working with both relative and absolute differences. The difficulty with …

Member Avatar for death_oclock
0
106
Member Avatar for death_oclock

I am having some trouble with the layout of my project. I'm using several APIs, including the WinAPI and DevIL. I had hoped to encapsulate each one in a separate header file, so that the main program would never have to know whats going on. The problem is, some functions …

Member Avatar for death_oclock
0
157
Member Avatar for death_oclock

My application creates a window in the main thread, but I want the message loop in a separate thread. Is there any way to catch the messages from that window while an another thread? I tried giving GetMessage that window's handle, it didn't work. I could just create the window …

Member Avatar for death_oclock
0
108
Member Avatar for death_oclock

I have the following globals defined (the relevant ones, anyway): [CODE=c] DWORD dwNumMaterials; LPD3DXBUFFER lpMaterials; LPD3DXMESH lpMeshBody; [/CODE] And the call to D3DLoadMeshFromX is here: [CODE=c] D3DXLoadMeshFromX(L"body.x", D3DXMESH_SYSTEMMEM, lpD3DDevice, NULL, &lpMaterials, NULL, &dwNumMaterials, &lpMeshBody); [/CODE] When this is called, it returns a generic error (0x80004005). Also, if it is needed …

Member Avatar for death_oclock
0
125
Member Avatar for death_oclock

I have the following globals defined (the relevant ones, anyway): [CODE] DWORD dwNumMaterials; LPD3DXBUFFER lpMaterials; LPD3DXMESH lpMeshBody; [/CODE] And the call to D3DLoadMeshFromX is here: [CODE] D3DXLoadMeshFromX(L"body.x", D3DXMESH_SYSTEMMEM, lpD3DDevice, NULL, &lpMaterials, NULL, &dwNumMaterials, &lpMeshBody); [/CODE] When this is called, it returns a generic error (0x80004005). Also, if it is needed …

Member Avatar for death_oclock
0
129
Member Avatar for death_oclock

I am making a blitting call on my backbuffer: [CODE=C++] BOOL drawImage(IMAGE *lpImage, LONG x, LONG y) { RECT rect; rect.left = x; rect.top = y; rect.right = x + lpImage->lWidth; rect.bottom = y + lpImage->lHeight; dwVideoErrCode = lpBack->Blt(&rect, lpImage->lpSurface, NULL, DDBLT_WAIT | DDBLT_KEYSRC, NULL); if(dwVideoErrCode != DD_OK) { MessageBox(NULL, …

0
71
Member Avatar for death_oclock

I am using DirectDraw to make a game and I am running it in 8-bit color mode. What I am having a problem with is making a macro to convert RGB values into a single 8-bit color. Here is the macro: [CODE=c++] #define RGB_8BIT(r, g, b) ((r & 224) + …

Member Avatar for chaosprime
0
159
Member Avatar for death_oclock

I need to find the number of elements in an array passed into a function. The problem is in this case, sizeof() returns the size of the pointer itself. It only does this when passed through to a function. So here is that function: [CODE=c++] bool matchWord(TWORD *wordList, TWORD *word, …

Member Avatar for death_oclock
0
192
Member Avatar for death_oclock

I'm writing a program that opens another console application with redirected input and output handles. I don't get any errors when I run this, but the console closes immediately, despite the system("pause") at the end. With the current solution, I have it redirecting to files, but another solution using pipes …

Member Avatar for death_oclock
0
272
Member Avatar for death_oclock

If I call the MessageBox function: [CODE]MessageBox(NULL, "Message", "Message", MB_OK);[/CODE] for example, the box will not appear. It will make the beeping sound, though.

Member Avatar for death_oclock
0
104
Member Avatar for death_oclock

I am trying to write an openGL application from a tutorial I found and tried to copy it as accurately as possible without just copy+pasting it, so I can actually learn the code. The source file from the tutorial compiles and runs perfectly, but my code fails at a call …

0
133
Member Avatar for death_oclock

So I have this code (the unnecessary parts omitted): [CODE=c++] #include <stdio.h> #include "scene.h" int main() { while(1); return 0; } [/CODE] And another file in the project called "scene.h". When I compile, I get these errors: [CODE] new types may not be defined in a return type extraneous 'int' …

Member Avatar for death_oclock
0
252

The End.