Search:

Type: Posts; User: fbs777

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    1,027

    i need to include this function in another...

    i need to include this function in another program, and he is writen in C, not C++
    I already know where to put the code, but i dont know how to convert this code from C++ to C
    .
  2. Replies
    6
    Views
    1,027

    so anyone can convert this code to C? the...

    so anyone can convert this code to C?

    the objective is read the /tmp/file1. if the content is 0 do nothing, if the content is 1, do something
  3. Replies
    6
    Views
    1,027

    this C++ code works in a C program?

    I have this code in a C++ program for linux, but i dont know if this can be placed in a C program "as is" or need some modification.


    #include <fstream> //used to ifstream, ofstream
    #include...
  4. Replies
    5
    Views
    1,380

    the only code i know is in shell script: ...

    the only code i know is in shell script:

    go=`cat /tmp/file_test` # "cat /tmp/file_test" read the content of the file_test
    if [ "$go" -eq "1" ]; then # if the content...
  5. Replies
    5
    Views
    1,380

    ???? what i need is very simple to do in shell...

    ????

    what i need is very simple to do in shell script:

    go=`cat /tmp/file_test` # "cat /tmp/file_test" read the content of the file_test
    if [ "$go" -eq "1" ]; then ...
  6. Replies
    5
    Views
    1,380

    how to check if the content of a file is "1"?

    i want to close the program if the content of the file /tmp/file_name is 1 (just the number 1).

    dont need to check all the time, just when start the program.

    can someone post a code to do this?
  7. Replies
    7
    Views
    1,339

    this: something like this: infinite...

    this:



    something like this:


    infinite loop{
    num='cat ./num'
    if num == 0
  8. Replies
    7
    Views
    1,339

    yes, but isnt a program just for this, this must...

    yes, but isnt a program just for this, this must be a function inside the normal program.

    A function to monitor this file, looking for changes from 0->1 or 1->0, and react accordingly.

    In the...
  9. Replies
    7
    Views
    1,339

    help w/ while (or other better for this)

    hi.

    i have a file "temp" just to store a number

    every time a x key is pressed, the number in file increase +1, and every time a y key is pressed, the number in file decrease -1, until 0 (0 is...
  10. Replies
    7
    Views
    8,050

    sorry, on the last edit to include the links i...

    sorry, on the last edit to include the links i forgot to put all again... yes, is the sdlmame and use sdl.

    i will see the source code of the xvkbd to see how he send the signal, and try to put in...
  11. Replies
    7
    Views
    8,050

    well, using the comand on terminal: xvkbd...

    well, using the comand on terminal:

    xvkbd -text c

    he returns the letter "c" on terminal, but if i try this:


    if ( ok() )
    {
    if ( event.jbutton.button == 7 )
  12. Replies
    7
    Views
    8,050

    well, im trying to edit the source code of an...

    well, im trying to edit the source code of an emulator, to accept a key only if ok() allow, but the emulator accept the keys and buttons everywhere, so dont matter the content of ok(), if i press the...
  13. Replies
    7
    Views
    8,050

    there is a function to auto press a key?

    I want something like this in a program running on linux:


    if ( ok() )
    {
    <code>
    }

    where <code> is a function to automatically press the key "C" in the keyboard, and the...
  14. Replies
    2
    Views
    1,005

    thank you, that was because the "

    thank you, that was because the "<< endl" :)
  15. Replies
    2
    Views
    1,005

    how to remove this broken line in the end?

    I have this source and im trying to use it on linux:


    #include <iostream>
    #include <sstream>
    #include <fstream>
    using namespace std;
    int main ()
    {
    char c;
  16. Replies
    4
    Views
    1,843

    when i execute in terminal the comand ls...

    when i execute in terminal the comand


    ls /dev/disk/by-id/ |cut -d_ -f3 |head -n 1

    i have this result with this hard disk:


    S19GJ50Q342568
  17. Replies
    4
    Views
    1,843

    error compiling a little program

    hi

    im trying to make a program in linux to call another program doing first a check to see if the HD has the right serial number

    i know if i put the serial in some parts of the code is possible...
  18. Replies
    0
    Views
    3,664

    advanced lock/unlock keys on keyboard

    i want to make a simple program to act like a daemon, running in background on system, just waiting the key "c" be pressed to activate for 5 min. some keys on keyboard (like a, b, d, f...).
    After...
Results 1 to 18 of 18