Search:

Type: Posts; User: bedtime

Search: Search took 0.01 seconds.

  1. *** SOLVED *** Just putting a simple...

    *** SOLVED ***

    Just putting a simple timeout(3000) right before the ch = getch() seems to have solved it.

    From timeout(3): curses input options - Linux man page:

    The timeout and wtimeout...
  2. Ncurses: how can I exit without pressing key?

    I'm trying to get my program to exit when ctrl-c is pressed or the window close button is activated, but before the program exits, it needs to run a function. In the original program, it's a function...
  3. Replies
    0
    Views
    1,816

    xlib: blocking mouse input and re-enabling

    The program below monitors mouse clicks and location. It recognizes when a user is swiping from the very left of the screen towards the center, and it's meant to be used on a touch device—in my case,...
  4. Thanks. I did a little reading on char pointers,...

    Thanks. I did a little reading on char pointers, and it makes much more sense now. :)
  5. Passing an array of char to function with persistence

    I am trying to take an array of char, pass it to a void function by point (mainly, I don't want that array to be copied), manipulate/add to it, and leave the function but with the array holding its...
  6. Replies
    2
    Views
    11,591

    The issue was that I didn't completely understand...

    The issue was that I didn't completely understand this and how to deal with it.

    I did get the issue fixed by bumping into this tutorial: POSIX Threads Programming

    Here is the fixed code:
    ...
  7. Replies
    2
    Views
    11,591

    pthread, passing argument to function error

    The program seems to work as intended, but I'm getting this error when compiling:


    $ gcc -O2 -Wall bar.c -o bar -lpthread -lX11 -L/usr/include/curl/lib -lcurl

    bar.c: In function ‘main’:...
  8. You're welcome. :)

    You're welcome. :)
  9. Updated code is below for anyone interested. I...

    Updated code is below for anyone interested. I got everything working great using the xtest library! ;)

    This code works on my Raspberry Pi 3b+ and will likely work on other Linux-based systems. It...
  10. Replies
    1
    Views
    15,730

    Reading /proc/stat and passing file to func

    I am trying to pass a file to a function. The file is /proc/stat, and the CPU portion works fine. This is just a small part of another file, broken down for help. It is run every second, and I'd...
  11. Replies
    2
    Views
    12,229

    So, if I've gathered correctly, a const, so long...

    So, if I've gathered correctly, a const, so long as it is not being taken as a reference, or pointer, or some type of situation forcing it to give its location in memory, is pretty much the same as...
  12. Replies
    2
    Views
    12,229

    Define a const variable at compile time?

    There seems to be so many ways in C++ to define a variable...

    I would like to define some constant variables at compile time such that there will be no run-time penalty. In other words, I don't...
  13. I read in a post that the library I was using to...

    I read in a post that the library I was using to make clicks was not completely made for what I was using it for. People were saying to use the XTest library.

    I did such, and, as it seems for now,...
  14. Sorry for the late response. I am a little burnt...

    Sorry for the late response. I am a little burnt out after plugging away for 6 hours trying to make a C++ curl library not cause memory leaks... but I wanted to respond to say that I am still here...
  15. Stimulating Mouse Clicks: only works on certain windows

    First post! :D

    The code below is made and run on my Raspberry Pi 3b+. It is made for use on a touchscreen, and it detects when the user is holding the left mouse button down (or pressing the touch...
Results 1 to 15 of 15