Category "c"

C11 variadic macro : put elements into brackets [duplicate]

I'm looking at a macro, or more likely a combination of macros, that would achieve the following effect : BRACKET(a) => { a } BRACKET(a

Why can low priority processes affect the latency of an high priority process?

I have tested the rt process's latency by cyclictest. And found that when I launch a few lower priority rt processes(priority is 40) the high priority rt proces

How to Fix: Error: Segmentation Violation and IncludePath Needs to be Updated from Debugger

I am working with ROOT and have ROOT installed in my computer. I am writing my code using Visual Studio. In my code I have the following header files: #include

What is the best way to pass parameters to a callback function? (C/C++) [closed]

I'm learning SDL right now and I'm trying to use timer callback function. The function SDL_AddTimer() offer me only one argument to pass throu

Fatal error in avr-gcc, specifies incorrect MCU

I am learning to program my ATtiny85 without a bootloader using a MiniPro, and I want to generate a hex file. First I try to compile my file using the avr-gcc c

Cache Simulator in C - Why am I getting a 'hit' every time?

I am writing a simple cache simulation in c. I'm somewhat of a noob when it comes to c but I have the program almost entirely working I think. For some reason i

debug an array of linked lists in c

I'm having a trouble in my project, at first I made one linked list and it worked properly but then I had to edit it and make it an array of linked list, but it

When I call the C system() function, is the location of the new program's main() stack frame similar to the original program's main() stack frame?

I'm wondering if when I call the C system() function, the location of the new program's main() stack frame is similar to the original program's main() stack fra

How do I decrypt with openssl something encrypted with cbc_crypt (xencrypt)?

In a database there is string encrypted with glibc's xencrypt which is using internally cbc_crypt and the decryption was happening with xdecrypt function which

statvfs wrong SD available size returned

I'm trying to monitor the available SD card size in a embedded linux system (petalinux). After looking for this topic around stackoverflow I learn that a good

Codeblocks 16-bit message

enter image description hereI'm new in Codeblocks and programming world. ( Unsupported 16-Bit Application The program or feature "\??C:\Users\Hossen\Desktop\C

Why can't local variable be used in GNU C basic inline asm statements?

Why cannot I use local variables from main to be used in basic asm inline? It is only allowed in extended asm, but why so? (I know local variables are on the st

How can I create a 2D array of chars with POINTERS in C?

I'm trying to create a program which the user inputs the number of items (rows) and give each one of them a name (scanf) with the max of 30 characters. I want t

C Pointer Arithmetic for Unusual Architectures

I'm trying to get a better understanding of the C standard. In particular I am interested in how pointer arithmetic might work in an implementation for an unusu

enabling paging leads to triple fault

In case this helps somebody in the future: check if the global descriptor table is working check if the elements of page table entry struct are ordered correctl

flickering in allegro with loops

The red bars a cross the top flickers. I can make them out of the loop but not in the loop. #include <allegro.h> void init(); void deinit(); int main() {

How to make an IIR filter?

i'm trying to make IIR filter. I made FIR filter, but I feels IIR is more difficult than FIR. I think IIR is similar with FIR, but it made me feels confused.

terminated by signal SIGKILL (Forced quit) DIFFERENT ERROR

I faced another problem here again with terminated by signal SIGSEGV (Address boundary error) But I found that there's an output here : Sequential elapsedTime:

Why can I not combine these two chars using strcat when they are both chars?

I am working on a game for the 3ds and I want it to be a cmd type game (I just felt like it). I am trying to have this char move to whatever x and y int number

In android how to find what /dev/input/event* is used for touchscreen using c function

I am trying to read touchscreen event, in my device /dev/input/event4 is used for touchscreen, while in some other phone, event7 is used for touchscreen. I am l