The best ide for gtk+ programming
Hello, Recently i start to studying C/gtk+ programming. And want to ask one question: how do you think, what is the best ide for C/gtk+ development? Thank you. ...
Hello, Recently i start to studying C/gtk+ programming. And want to ask one question: how do you think, what is the best ide for C/gtk+ development? Thank you. ...
Hi, I have a set of characters, minimum hundreds of characters. How could i get the position of a particular character in that list efficiently. ...
I need to get last four bytes out of a double variable .The platform is Arm and compiler is RVCT.Programming language used is C.What is the safest way. Thanks ...
Hi, I'm trying to implement a simple priority queue from array of queues. I'm trying to define a struct queue, and than a struct priority queue that has an array of queues as its member variable. However, when I try to compile the code, I get the following error: pcb.h:30: error: array type has incomplete element type The code is bel...
Edit 2 Thanks for all the suggestions, I edited the code below from the suggestions given. However, it still doesnt seem to compile. But nevertheless, thanks a lot for the help hands. Edit I apologize for not putting the pcb struct into the code snippet. There is a struct called pcb defined in above the two structs I originally posted...
As part of answering another question, I came across a piece of code like this, which gcc compiles without complaint. typedef struct { struct xyz *z; } xyz; int main (void) { return 0; } This is the means I've always used to construct types that point to themselves (e.g., linked lists) but I've always thought you had to name t...
To define constants, what is the more common and correct way? What is the cost, in terms of compilation, linking, etc., of defining constants with #define? It is another way less expensive? ...
Hi, I need to provide a C static library to the client and need to be able to make a struct definition unavailable. On top of that I need to be able to execute code before the main at library initialization using a global variable. Here's my code: private.h #ifndef PRIVATE_H #define PRIVATE_H typedef struct TEST test; #endif pri...
Ok my C is a bit rusty but I figured I'd make my next(small) project in C so I could polish back up on it and less than 20 lines in I already have a seg fault. This is my complete code: #define ROWS 4 #define COLS 4 char main_map[ROWS][COLS+1]={ "a.bb", "a.c.", "adc.", ".dc."}; void print_map(char** map){ int i; for(i=0;...
I have written a program in C to send a byte to serial port (com). I have used BIOSCOM to send data but I guess that it doesn't open the port. Please tell how I can open and close a com port in C. My code is here: #define COM1 1; bioscom (1 , 65 , COM1); Please help me... ...
I want to get a GtkTreePath or GtkTreeIter to the last row in a GtkTreeModel, but GtkTreeModel does not have a function for that. I'll be happy with answers and examples in either C, or Python, or both ;). ...
Is it possible to tell valgrind to ignore some set of libraries? Specifically glibc libraries.. Actual Problem: I have some code that runs fine in normal execution. No leaks etc. When I try to run it through valgrind, I get core dumps and program restarts/stops. Core usually points to glibc functions (usually fseek, mutex etc). I und...
When I compile function with "gcc -o dene -Wall -ansi -pedantic-errors dene.c" ,gcc emits no error.(can you look a line which starts with char ....,in if loop,) static void remove_negation(char *s,char *s1) { char **cmainp=malloc(sizeof(char*)*1); int len=0;int d=0; int i=0; ...
Hi StackOverflow, I have an application that is parallellized using pthreads. The application has a iterative routine call and a thread spawn within the rountine (pthread_create and pthread_join) to parallelize the computation intensive section in the routine. When I use an instrumenting tool like PIN to collect the statistics the tool ...
When interviewing new candidates, we usually ask them to write a piece of C code to count the number of bits with value 1 in a given byte variable (e.g. the byte 3 has two 1-bits). I know all the common answers, such as right shifting eight times, or indexing constant table of 256 precomputed results. But, is there a smarter way with...
How do I store/retrieve an NSMutableArray of objects? The easy / fast way please. Thanks! ...
int* p = 0; int* q = &*p; Is this undefined behavior or not? I browsed some related questions, but this specific aspect didn't show up. ...
Hi' I'm writing a simple http port forwarder. I read data from port 80, and pass the data to my lighttpd server, on port 8080. As long as I write() data on the socket on port 8080 (forwarding the request) there's no problem, but when I read() data from that socket (forwarding the response), the last read() hangs a lot (about 1 or 2 seco...
ive got a struct problem it returns: cd.h:15: error: two or more data types in declaration specifiers its probably something simple ... struct cd { char titel[32]; char artiest[32]; int speelduur; }; typedef struct cd CD; struct cdlijst{ CD *item; struct cdlijst *next; } ...
Possible Duplicate: Can you make an incrementing compiler constant? Example: I try to do this: static NSInteger stepNum = 1; #define METHODNAME(i) -(void)step##i #define STEP METHODNAME(stepNum++) @implementation Test STEP { // do stuff... [self nextFrame:@selector(step2) afterDelay:1]; } STEP { // do stuff.....