For chrissake, I think you're right. I hate programming.
In a masochistic sort of way.
Type: Posts; User: AaronP
For chrissake, I think you're right. I hate programming.
In a masochistic sort of way.
Yeah, same deal.
I've got a struct
typedef struct _entry{
bool is_submenu;
gchar *name;
gchar *command;
Perhaps. I'm using the binary in the Arch Linux (i686) repos. Thanks for the help, though. :)
Well I'm declaring a set of constant arrays in a header, so I don't want to use malloc. I'm just looking for a good way to store the arrays size within the data so I can pass it to a function without...
I'm using gcc with -std=c99.
EDIT: It compiles with clang, though. :/
Hmm, using the above solution, I'm still getting the error "initializer element not constant" for q_keys.
Hmm. Well, what's the best practice for getting this effect in C?
I'm trying to set up a simple array type that is aware of its size in C. "Flexible arrays" seemed at first glance to be the solution, but I ran into problems. Here's what I've got so far.
...
Ah, thanks to both Tater and KC, I've got it working. Yeah I know, it's not the best way to do things, but I've already put off enough exercises for until I review pointers that I want to make sure I...
I'm going through the K&R examples, and I've run into a snag on 1-17.
My current code:
#include <stdio.h>
#include <string.h>
const int MAX_ARRAY_SIZE = 1000;