October 22, 2024
Chicago 12, Melborne City, USA
C#

Listing and finding windows on OS X

I am trying to do some stuff on OS X using the carbon api, but I can’t find anything I am looking for on google or the Apple development website. Ideally I would like to find a function that finds the window at a certain location on screen. It seems that there are similar functions,

Read More
C#

Disable warning: the `gets' function is dangerous in GCC through header files?

I am using the function gets() in my C code. My code is working fine but I am getting a warning message (.text+0xe6): warning: the `gets' function is dangerous and should not be used. I want this warning message not to pop up. Is there any way? I am wondering that there might be such

Read More
C#

Using C Libraries for C++ Programs

I am trying to control Dynamixel servos using a GUI made using Qt. Dynamixel provides a C set of C libraries to control the motors, while the only way of making GUI’s I know is Qt, which is essentially C++. Will it be possible to use Dynamixel C libraries from Qt C++ code in any

Read More
C#

Link step can't find symbols (XC8 compiler)

I’m trying to compile and link a C program using the XC8 compiler. I changed from the C18 compiler and made some minor compatibility changes to the code. With C18, the code compiled and linked just fine. With XC8, compiling goes fine, but the link step fails with this error: Error [500] ; 0. undefined

Read More
C#

What is 'forward declaration' and the difference between 'typedef struct X' and 'struct X'?

I am a beginner in C programming and I know the difference between struct type declaration and typedef struct declaration. I came across to know an answer saying that if we define a struct like: typedef struct { some members; } struct_name; Then it will be like providing an alias to an anonymous struct (as

Read More
C#

does fetching values into local variables allow greater optimization in C/C++?

I’ve often wondered this. Suppose you’ve got a loop in a function or method, like: for (int i = 0; i < count; ++i) ...do stuff including function/method calls...; Suppose count is some variable external to the function – a global variable, a data member of the object performing the loop, whatever. Not a local

Read More
C#

Win32 – read from stdin with timeout

I’m trying to do something which I think should be simple: do a blocking read from standard input, but timing out after a specified interval if no data is available. In the Unix world this would be simple with select() but that doesn’t work in Windows because stdin isn’t a socket. What’s the next simplest

Read More
C#

FFmpeg VAAPI: GOP Size Setting Not Applied During Encoding

I’m working on a video transcoding project using FFmpeg with VAAPI hardware acceleration, and I’m encountering an issue where the gop_size parameter is not being respected during encoding. Despite setting the gop_size to 150 in the encoder context, the output video does not have the expected GOP structure. This problem only occurs when using VAAPI

Read More
C#

How to detect when the delete key is pressed on the keyboard?

I want that when the Del key is pressed a certain function is called. How can I achieve that using getch() if possible or otherwise some nested getch() calls? You need to sign in to view this answers

Read More
C#

How to install perlbrew following c compiler error

I am new to Perl (I am using it for a new specific project), and I am trying to following the following tutorial to install Perlbrew: https://www.ensembl.info/2013/09/09/installing-perl-dbdmysql-and-ensembl-on-osx/ I am running OSX Monterey Version 12.3. When I run the following code block: perlbrew install -j 5 --as 5.14.4 \ --thread --64all -Duseshrplib perl-5.14.4 I get the

Read More