Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.43 seconds.

  1. Replies
    7
    Views
    87

    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...
  2. Replies
    4
    Views
    189

    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...
  3. You can use strrchr...

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

    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...
  5. Replies
    25
    Views
    752

    > 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...
  6. 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];
    ...
  7. 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).
  8. Replies
    2
    Views
    359

    > 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...
  9. Replies
    25
    Views
    752

    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...
  10. Replies
    25
    Views
    752

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

    In C


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

    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 )
  12. Replies
    6
    Views
    503

    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...
  13. Replies
    1
    Views
    319

    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...
  14. Replies
    27
    Views
    821

    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...
  15. Replies
    27
    Views
    821

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

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

    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.
  17. Replies
    6
    Views
    503

    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...
  18. 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...
  19. Replies
    27
    Views
    821

    @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.
  20. 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
  21. Which compiler/IDE are you using?

    Which compiler/IDE are you using?
  22. Replies
    1
    Views
    299

    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.
  23. > 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?
  24. Replies
    8
    Views
    469

    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
  25. Replies
    8
    Views
    469

    I thought it was just a 2D array of some number...

    I thought it was just a 2D array of some number of rows initialised with
    x, pow(x,2), pow(x,3)
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4