Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.20 seconds.

  1. Replies
    5
    Views
    49

    > I do believe it is safe as I immediately act on...

    > I do believe it is safe as I immediately act on the results and use them before the function gets called again
    Well....

    > This is all occurring on an embedded processor with a well defined...
  2. Whatever. Post your code and we'll tell you...

    Whatever.

    Post your code and we'll tell you whether it's right or not.
  3. Replies
    5
    Views
    49

    This NEVER works, can never work. int *foo (...

    This NEVER works, can never work.


    int *foo ( ) {
    int array[10];
    // do stuff
    return array;
    }
  4. What's UDF?

    What's UDF?
  5. If you're looking for run-time, you need some...

    If you're looking for run-time, you need some kind of profiling tool.
    Gprof - Wikipedia
  6. Replies
    4
    Views
    74

    Sorry, it looks like I got the source and...

    Sorry, it looks like I got the source and destination arrays mixed up. I thought you were trying to fit 16 somethings into 3 somethings.



    #include<stdio.h>
    #include<stdlib.h>...
  7. Replies
    4
    Views
    74

    > uint8_t payload = 3; > uint16_t...

    > uint8_t payload = 3;
    > uint16_t raw_data[payload];
    ..
    > index += snprintf(&data_tx[index], 5 , "%d", raw_data[i]);
    std::printf, std::fprintf, std::sprintf, std::snprintf - cppreference.com...
  8. if ( strcmp(input,"apple") == 0 )

    if ( strcmp(input,"apple") == 0 )
  9. Most decent C++ aware IDEs have things like -...

    Most decent C++ aware IDEs have things like
    - find declaration
    - find definition
    - find references

    Highlight the thing you're interested and pick door number 3.
  10. Replies
    8
    Views
    153

    Seems familiar.... Please help me with...

    Seems familiar....
    Please help me with understanding this program i had on a quiz today!! : C_Programming
  11. Also here -> Multithreading Programming Problem -...

    Also here -> Multithreading Programming Problem - C++ Forum
  12. Replies
    15
    Views
    367

    Read it again. multi-argument function pointer...

    Read it again.
    multi-argument function pointer and enum

    The function pointer has to have ZERO parameters, no parameters, not void - just empty.
  13. Thread: Data to location

    by Salem
    Replies
    19
    Views
    418

    Sure, go and read the tutorial again (several...

    Sure, go and read the tutorial again (several times).

    This isn't some cake walk.
    Everything is hard work in C.

    Expect to spend a few days getting to grips with this, not a few hours.

    If you...
  14. Thread: Data to location

    by Salem
    Replies
    19
    Views
    418

    Read this -> Beej's Guide to Network Programming...

    Read this -> Beej's Guide to Network Programming
  15. Thread: assign bits

    by Salem
    Replies
    10
    Views
    211

    You asked? You have a compiler sitting in...

    You asked?

    You have a compiler sitting in front of you, and it was a 1 character change to change 0 to 1 and find out.
  16. Thread: assign bits

    by Salem
    Replies
    10
    Views
    211

    So what do you see when you do ...

    So what do you see when you do

    status.widthValidated = 0;
  17. > sizeof(s)/sizeof(s[0]) This only works with...

    > sizeof(s)/sizeof(s[0])
    This only works with real arrays.



    char a[100];
    // sizeof(s)/sizeof(s[0]) will give you 100


    Neither of these will tell you how much memory you have to play with.
  18. Replies
    2
    Views
    127

    Why don't you just do struct tm...

    Why don't you just do


    struct tm file_timestamp = { 0 };


    But normally, I would expect the thing that writes to file_timestamp to return a success/fail status of some sort (which you should...
  19. Replies
    15
    Views
    367

    > 1. How to design a function pointer that can...

    > 1. How to design a function pointer that can deal with various types of functions ?
    In C, the empty parameter list means any parameters, which is the closest you're going to get.

    ...
  20. Your compare function would start something like...

    Your compare function would start something like this.


    int compare(const void * a, const void * b) {
    const struct parabola *pa = a;
    const struct parabola *pb = b;
    double ha, hb; //...
  21. Thread: memcmp ?

    by Salem
    Replies
    6
    Views
    231

    Why don't you start with for ( i = 0 ; i

    Why don't you start with


    for ( i = 0 ; i < HOW_MANY_SENSORS ; i++ ) {
    if ( temp[i] == 0xff ) {
    // something
    }
    }
  22. Short answer - no. Long answer - if you can...

    Short answer - no.

    Long answer - if you can make your OS swallow a blue pill, and somehow intercept the communication between the file system driver and the physical disk, then you can change...
  23. Replies
    1
    Views
    152

    You need to print it to a buffer using sprintf. ...

    You need to print it to a buffer using sprintf.



    char buff[1000];
    sprintf(buff,"curl -k -X PUT https://%s/ProductActions/PowerCycle -O '/tmp/pwrc' 2>&1", naslov);
    system(buff);
  24. If you want to numerically deal with the large...

    If you want to numerically deal with the large numbers, then perhaps The GNU MP Bignum Library
  25. Replies
    2
    Views
    175

    > So basicly my whole program works, if this one...

    > So basicly my whole program works, if this one condition is valid (and i don't understand why)
    Surely not.....



    foo.c:18:9: error: assignment to expression with array type
    new =...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4