Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.32 seconds; generated 53 minute(s) ago.

  1. 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];
    ...
  2. 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).
  3. Replies
    2
    Views
    111

    > 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...
  4. Replies
    17
    Views
    318

    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...
  5. Replies
    17
    Views
    318

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

    In C


    if ( foo != 0 ) {
    // then code
    } else {
    // else code
    }
  6. Replies
    17
    Views
    318

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

    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...
  8. Replies
    1
    Views
    146

    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...
  9. Replies
    27
    Views
    458

    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...
  10. Replies
    27
    Views
    458

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

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

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

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

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

    Which compiler/IDE are you using?
  17. Replies
    1
    Views
    146

    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.
  18. > 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?
  19. Replies
    8
    Views
    288

    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
  20. Replies
    8
    Views
    288

    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)
  21. Replies
    3
    Views
    182

    What you posted makes no sense. i and k are...

    What you posted makes no sense.

    i and k are unused.
    something and xx are undeclared.
    x % x is always 0 to begin with, so its always going to break out of the loop.

    The whole lot just seems to...
  22. Replies
    3
    Views
    182

    Maybe you should state the whole question, not...

    Maybe you should state the whole question, not some paraphrased mis-understanding of it.

    'if' is also a 'test', not a 'some' (whatever that is).
  23. So make your condition if (row < 0 ||...

    So make your condition


    if (row < 0 || col < 0 || row >= ROW || col >= COL)
    return true;
  24. First off, count1 and count2 are poor names for...

    First off, count1 and count2 are poor names for your functions.

    Points for you to think about.
    As much as you can, write the code in stages and try to write some kind of test for it.
    If your...
  25. if(isdigit(*format)) { ...

    if(isdigit(*format))
    {
    precision = atoi(format);
    format++;
    continue;
    }


    I think this should be
Results 1 to 25 of 494
Page 1 of 20 1 2 3 4