Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.39 seconds.

  1. Replies
    6
    Views
    129

    Most people get up to speed working with native...

    Most people get up to speed working with native compilers first (the code runs on the same machine as the compiler).

    Cross-compilers are a whole new level of complexity.
  2. Replies
    6
    Views
    129

    The key phrase there is "cross-compiler". >...

    The key phrase there is "cross-compiler".

    > This package contains the C++ compiler, supporting cross-compiling to 32-bit MinGW-w64 targets".
    The compiler runs on Linux, but the code it produces...
  3. Replies
    6
    Views
    129

    mingw-w64 is what you use if you want to use gcc...

    mingw-w64 is what you use if you want to use gcc within windows itself.

    If you're inside wsl2, then you have a real Linux OS and can just use the regular gcc without any further faffing about.
  4. Yeah he's around from time to time, though it may...

    Yeah he's around from time to time, though it may be a few days before getting a response.
  5. Replies
    5
    Views
    201

    One pass through the outer loop of a bubble sort...

    One pass through the outer loop of a bubble sort looks remarkably similar to the linear search through a linked list.

    Try looking at the code for both side by side.
  6. Start here...

    Start here
    https://cboard.cprogramming.com/general-discussions/announcements.html
  7. Replies
    5
    Views
    201

    Well it barely counts as a 'sort' since you only...

    Well it barely counts as a 'sort' since you only ever do one pass to move/insert the item in the correct place.

    Plus you stop when you find the place where the item is supposed to go.
  8. Replies
    3
    Views
    325

    I moved it because it wasn't a C question.

    I moved it because it wasn't a C question.
  9. Replies
    1
    Views
    240

    First step, add some debug print (or use a...

    First step, add some debug print (or use a debugger) to get some visual indication of what's going on.


    int sort_ascending(int a[],int size,int *loc_ptr)
    {
    int x,temp,pass;

    ...
  10. Replies
    9
    Views
    480

    Please attach your text file as text, not a...

    Please attach your text file as text, not a broken inline picture.

    What is 'buffer' initialised to prior to calling malloc?

    What stops 'o' from running past the end of allocated space?
  11. Replies
    5
    Views
    336

    The symbol is resolved by libX11.so $ nm -D...

    The symbol is resolved by libX11.so


    $ nm -D /usr/lib/x86_64-linux-gnu/libXext.so | grep XOpenDisplay
    $ nm -D /usr/lib/x86_64-linux-gnu/libX11.so | grep XOpenDisplay
    000000000002d370 T...
  12. Replies
    6
    Views
    381

    The code is getting uglier, but is it getting any...

    The code is getting uglier, but is it getting any quicker?
  13. Replies
    2
    Views
    262

    PlaySound function (Windows) | Microsoft Docs...

    PlaySound function (Windows) | Microsoft Docs
    1. Trying to pass 4 parameters to a function expecting only 3 should have at least got you a warning message.
    It should be an error.

    The last 'two'...
  14. You could do the double fork. if ( fork() ==...

    You could do the double fork.


    if ( fork() == 0 ) {
    if ( fork() == 0 ) {
    execvp(*arg, arg);
    } else {
    _exit(0);
    }
    }
  15. Replies
    7
    Views
    434

    Use %p if you want to print a pointer.

    Use %p if you want to print a pointer.
  16. Replies
    9
    Views
    622

    > In what respect does fgets() differ from...

    > In what respect does fgets() differ from gets()?
    fgets won't overrun the end of the buffer you supply, so long as you're honest about the size of the buffer.

    > what is the size of the said...
  17. Replies
    6
    Views
    381

    > Does the modification make any difference ?...

    > Does the modification make any difference ?
    Why haven't you tested it?

    > If so is that modification more efficient ?
    Why haven't you tested it?

    Here are some test cases
    - the...
  18. Thread: matrix Problem

    by Salem
    Replies
    1
    Views
    259

    https://cboard.cprogramming.com/announcement.php?a...

    https://cboard.cprogramming.com/announcement.php?a=39
    Make an effort.
    Just dumping your assignment isn't good enough.
  19. https://cboard.cprogramming.com/announcement.php?a...

    https://cboard.cprogramming.com/announcement.php?a=39
    Make an effort.
    Just dumping your assignment isn't good enough.
  20. Replies
    25
    Views
    1,312

    Your indentation is STILL a mess. You don't call...

    Your indentation is STILL a mess.
    You don't call your function from main, so - really - nothing happens.
  21. Replies
    2
    Views
    395

    > I have an exe project with a large struct in...

    > I have an exe project with a large struct in it.
    What constitutes 'large'?
    1KB
    4KB
    64KB
    1MB
    ?

    What happens in the DLL if it dereferences the pointer to supposedly read a garbage value,...
  22. Just delete the call to wait(NULL);

    Just delete the call to wait(NULL);
  23. Replies
    2
    Views
    257

    Maybe you can use %s instead of %c in the last...

    Maybe you can use %s instead of %c in the last case.

    Or learn to use your compiler.


    $ gcc -Wall foo.c
    foo.c: In function ‘main’:
    foo.c:8:12: warning: format ‘%c’ expects argument of type...
  24. Replies
    25
    Views
    1,312

    > I have removed the const input and below is my...

    > I have removed the const input and below is my code. please check it.
    How about you indent it properly first.
    It's a dogs breakfast.
  25. Replies
    3
    Views
    418

    > cur_data is a global variable Ugh, why isn't...

    > cur_data is a global variable
    Ugh, why isn't it a parameter?



    static void dump(void *cur_data, const char *prefix, size_t size)
    {
    switch(size){
    case sizeof(struct A): {
    ...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4