Ok, first of all, you need to learn how to use the debugger. It's an essential skill for all programmers.
A Quickstart Guide to Debugging C Programs with gdb
If you're using an IDE, it may be as...
Type: Posts; User: GReaper
Ok, first of all, you need to learn how to use the debugger. It's an essential skill for all programmers.
A Quickstart Guide to Debugging C Programs with gdb
If you're using an IDE, it may be as...
The outer loop seems useless. Seeing that the inner loop is some kind of busy loop that waits for the value of m_finished to change, and judging by the name WAIT_FOR_PERIPH, I'd say this snippet...
Indeed, using the equality operator on two arrays is perfectly valid C, although it would only produce the desired result if those two arrays were actually the exact same array in memory. That...
Why are you saving the integer inside the char array? Why are you passing "sizeof(char*)" as the size?
Btw, you don't want to use "char" for the types of size and left/right. "int" would be much...
What do you need help with exactly?
Initializing an array of structs is similar to a multi-dimensional array:
lessons info[10] = {
{ "Physical education", "Harry", "Pleter", 32 },
{ "History", "Emily", "Shelton", 12 },
...
They way I do it is to have two variables, one for the allocated size and another for the used size. When the used size equals the allocated size, it's time to allocate new memory.
Use fgetc() and fputc() instead. Or better yet, at a lower level, use fread() and fwrite() with the buffer.
If you don't worry about punctuation, reading words is just:
scanf("%s", wordStr);
For the reversing of each word, an easy implementation would be to use recursion. Or you could implement your...
Do you have any proper documentation for the language and the compiler? I'm sorry, but that link is awful. You can't expect us to understand how it works just by showing some random examples. A wiki...
Because "%c" is special, in the way that it doesn't ignore whitespace. If you want it to, you need to add a space before the percent sign, like this:
scanf(" %c", &ch);
Search for beginner's WinAPI tutorials, they'll teach you the basics.
It seems like a typo here, both should be like line #14. Let me explain:
In line #10, "p" is used like an array of pointers.
In line #14, "p" is used like a pointer to an array.
You can't do...
Line #13 (declaration inside the for statement) is C99, although all compilers support it as an extension regardless. You should be using C99 anyway, all compilers support it (if yours doesn't, don't...
You would need to associate the different strings a user can input with the program names (and anything else, if applicable). For example:
typedef struct {
const char* name;
const char*...
So, you want multiple weapons to match on the same key? You can't do that with a map, I don't think. What you need is a multimap.
Works just fine for me. You're probably passing the wrong window handle to DefWindowProc inside cif_win32_wndproc.
In an unrelated note, since you're using the portable OpenGL, I'd suggest not...
Oof...
It is indeed a nice forum. When I joined, back in 2009, Salem, Laserlight, Phantomotap and other regular members helped me quite a bit in becoming a better programmer.
You need to point netbeans to the bin and lib directories of cygwin. I don't remember, but I though netbeans had an option to do that for you automatically.
One minor thing: You shouldn't do the matrix-to-matrix multiplications inside the shader, unless you have direct use for those matrices. The CPU is far better suited for that task. I usually just...
What makes you think a library is faster than direct WinAPI calls? Whatever the library you're using, ultimately is has to make the same (and, most of the time, many more) calls to the operating...
You may want to add '\e', it's not exactly standard but it's widely used for ANSI escape sequences.
You're obviously doing something wrong at either the loading or the rendering phase. Without code, we can just guess.
How does your code even compile? Because It shouldn't. You can't pass a 2D array to a function without telling it its dimensions. All but the leftmost dimension must be passed, like this:
void...
I think you misunderstood the use of fgetpos/fsetpos. fpos_t isn't (or rather, may not be) a simple integer. The content of an fpos_t object is not meant to be read/written directly, but only to be...