Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.22 seconds; generated 57 minute(s) ago.

  1. Replies
    12
    Views
    201

    Beware that the LSB of rand() might not be all...

    Beware that the LSB of rand() might not be all that it seems.
    Question 13.18
  2. Replies
    7
    Views
    109

    cant print correctly a long double in C - Stack...

    cant print correctly a long double in C - Stack Overflow
    The problem stems from MinGW using the Microsoft runtime library (the code that implements printf).
    This is all well and good until you get...
  3. Replies
    4
    Views
    208

    So run the code in the debugger and find out more...

    So run the code in the debugger and find out more information.

    1. Compile with debug information
    gcc -g -o client client.c

    2. Load into the debugger
    gdb ./client

    3. At the next prompt type...
  4. You can use strrchr...

    You can use strrchr to find the last '.' in a string.
  5. Replies
    2
    Views
    384

    In your makefile (or some pre-build step), do ...

    In your makefile (or some pre-build step), do


    echo 'const char *version="'$(git describe --abbrev = 4 --always --tags)'";"' > version_info.c


    Then compile and link with that file, with an...
  6. Replies
    25
    Views
    769

    > If the conditional falls through (in other...

    > If the conditional falls through (in other words, the 'else' case), there are instructions to discard the subroutine address from the stack
    > and then jump to a completely different part of the...
  7. Your PrintCard is broken. $ gcc bar.c...

    Your PrintCard is broken.


    $ gcc bar.c
    bar.c: In function ‘PrintCard’:
    bar.c:90:12: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
    tempsuit = deck[0];
    ...
  8. Sure, post your latest code. But make sure you...

    Sure, post your latest code.
    But make sure you use "copy as text" in your IDE and/or "paste as text" in your browser, to stop it looking a mess (as you deleted from your other posts).
  9. Replies
    2
    Views
    377

    > void storeMaze(int N, int M, int matrix[N][M],...

    > void storeMaze(int N, int M, int matrix[N][M], FILE *fp);
    If you can do this,

    then you should be able to do this
    bool findPath(int N, int M, char maze[N][M], int x, int y)

    But I would...
  10. Replies
    25
    Views
    769

    What's the end goal here? a) Actual readable C...

    What's the end goal here?

    a) Actual readable C code you can maintain and enhance in the future.
    b) The ugliest hack that will just get past a C compiler to allow you to put the same functionality...
  11. Replies
    25
    Views
    769

    In C if ( foo != 0 ) { // then code }...

    In C


    if ( foo != 0 ) {
    // then code
    } else {
    // else code
    }
  12. Replies
    25
    Views
    769

    Do you have an instruction set reference? 6800...

    Do you have an instruction set reference?
    6800 instruction set

    BMI - Branch if minus
    if ( my_signed_number < 0 )

    BPL - Branch if plus
    if ( my_signed_number >= 0 )
  13. Replies
    6
    Views
    519

    TBH, I would suggest you start with int...

    TBH, I would suggest you start with


    int coins_array[] = {1,1,2,2,3};
    int N = sizeof(coins_array) / sizeof(coins_array[0]);
    int S = 6, Sol[MAX], IndexUsed[MAX], total;


    It's something you...
  14. Replies
    1
    Views
    333

    Your pseudo code looks fairly reasonable, but...

    Your pseudo code looks fairly reasonable, but your actual code bears almost no resemblance to it (and is just plain wrong in many places).

    Start by pasting the pseudo-code into code.


    int main...
  15. Replies
    27
    Views
    839

    foo.c: In function ‘subtraction’: foo.c:776:20:...

    foo.c: In function ‘subtraction’:
    foo.c:776:20: warning: ‘x1’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    if (x1 == NULL && x2 == NULL) {

    You make a point...
  16. Replies
    27
    Views
    839

    Do you have a short example of the input data...

    Do you have a short example of the input data file?
  17. Replies
    3
    Views
    711

    Tsk Tsk - quoting your own post only to mis-quote...

    Tsk Tsk - quoting your own post only to mis-quote it with the spammy link.
    Nice try.
  18. Replies
    6
    Views
    519

    A couple of thoughts spring to mind. 1. You...

    A couple of thoughts spring to mind.

    1. You have no exit condition for your recursion.
    You keep doing back(step+1); but there is no if(step==?) return; case to tell you that you've either...
  19. You're using the Orwell one and it doesn't work?...

    You're using the Orwell one and it doesn't work?

    I commented out Item (not that it should matter for the purpose of the exercise), and it compiles just fine here



    $ cat menu.h
    #ifndef...
  20. Replies
    27
    Views
    839

    @amohammed63, please use "copy as text" and/or...

    @amohammed63, please use "copy as text" and/or "paste as text" options of your IDE / browser.
    Your posts are unformatted and unreadable with the mix of pastel colours.
  21. Are you talking about the archaic "Bloodshed"...

    Are you talking about the archaic "Bloodshed" Dev-C++ or the somewhat up to date "Orwell" Dev-C++.

    Because the bloodshed one is about 20 years out of date.

    Dev-C++ download | SourceForge.net
  22. Which compiler/IDE are you using?

    Which compiler/IDE are you using?
  23. Replies
    1
    Views
    312

    This isn't a homework on demand site. If you...

    This isn't a homework on demand site.
    If you want help, you need to make an effort first.
  24. > How do I check it before using from multiple...

    > How do I check it before using from multiple pthreads?
    Does it use any global variables?
    Does it use any static variables?
    Does it open any files for writing?
  25. Replies
    8
    Views
    484

    As I said m[i][j] = pow(i+1,j+1); pow()...

    As I said


    m[i][j] = pow(i+1,j+1);


    pow() is in math.h
Results 1 to 25 of 494
Page 1 of 20 1 2 3 4