switch case: error: case label does not reduce to an integer constant?

int value; const int signalmin = some_function(); switch(value) { case signalmin: break; } I read the valu...

Why does scanf() need “%lf” for doubles, when printf() is okay with just “%f”??

Why is it that scanf() needs the l in "%lf" when reading a double, when printf() can use "%f" regardless of whether ...

Warning comparison between pointer and integer?

I am getting a warning when I iterate through the character pointer and check when the pointer reaches the null term...

RobotC - Programming an Elevator?

I'm designing and programming an elevator-like robot for a high school project. Could I possibly do anything to make...

Receiving warning “implicit declaration of function 'strlen'”?

I have a some simple code, but I am receiving a warning: -bash-3.2$ gcc -Wall print_process_environ.c -o p_p print...

Unknown ending signal when using debugger gdb?

I have installed GDB on Mac OS X and to test that it works I have used this following C program. #include <stdi...

error: ISO C forbids nested functions - What's wrong??

What's wrong with this merge sort usage? I'm trying to sort an array of size 9 as given in main(). However, I'm usin...

error C2371: 'functionname' redefinition: different basic types?

i have a Problem. I use Visual Studio 2013 and get the following Error: Error C2371: 'getgrundflaeche' redefinition...

Incompatible implicit declaration of built-in function ‘malloc’?

I'm getting this error: warning: incompatible implicit declaration of built-in function ‘malloc’ I am tryi...

Invalid type argument of -> C structs?

I am trying to access items in an array of structs and print the structs fields as follows printList(Album *a, int ...

Proper way to empty a C-String?

I've been working on a project in C that requires me to mess around with strings a lot. Normally, I do program in C...

error: expected declaration or statement at end of input in c?

void mi_start_curr_serv(void){ #if 0 //stmt #endif } I'm getting an error as "error: expected declaration or ...

function declaration isn't a prototype?

I have a library I created, mylib.c: #include <mylib.h> int testlib() { printf("Hello world\n"); ret...