Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.29 seconds.

  1. Start by wrapping a small test program around it....

    Start by wrapping a small test program around it.


    int main ( ) {
    for ( int year = 0 ; year <= 2100 ; year++ ) {
    int leap = 42;
    long long seconds = __year_to_secs(year,...
  2. Replies
    1
    Views
    120

    You can't meaningfully compare the addresses of...

    You can't meaningfully compare the addresses of independent variables.

    Knowing what &a is tells you nothing about what &b should be. The compiler is free to arrange and order independent...
  3. Replies
    4
    Views
    260

    Also, if you change the head, you need to return...

    Also, if you change the head, you need to return it.

    Any function which modifies the list should typically be of the form
    struct n *traverse(struct n *head, ...

    which ultimately results in...
  4. Replies
    4
    Views
    260

    So where in your code do you take care of the...

    So where in your code do you take care of the following

    Linked list - Wikipedia
    If you delete the first node, you have a new head.
    If you delete a node in the middle, you need to then make...
  5. Replies
    7
    Views
    228

    This is what it produces as a byte stream. $...

    This is what it produces as a byte stream.


    $ cat foo.c
    #include <stdio.h>
    int main () {
    printf("\x81 \x94 \x99 \x9A\n");
    printf(" \n");
    printf("\x2e\n");
    return 0;
  6. Replies
    7
    Views
    271

    The first thing you need to do is edit your post...

    The first thing you need to do is edit your post and then paste the code "text only".
    The horrible colour scheme from your IDE conflicts with the board and reduces your code to mush.

    Or just...
  7. Replies
    5
    Views
    166

    Well the way to run a console program is by...

    Well the way to run a console program is by opening a console (cmd.exe) and then doing
    cd \path\to\bin\Debug
    prog.exe


    Double-clicking on it in explorer will just create a console for the...
  8. Replies
    7
    Views
    228

    Well the representation of non ASCII characters...

    Well the representation of non ASCII characters depends on
    - your OS
    - your compiler
    - your console/terminal (not all are capable of rendering extended characters)
    - your fonts (not all have...
  9. So it would seem. Gede : Start...

    So it would seem.
    Gede : Start
    Still looks like a toy rather than anything I'd want to use in anger.

    Much less using it as the 'excuse' for not being able to copy/paste text.
  10. > I would if gede provided that option, as it...

    > I would if gede provided that option, as it currently stands it doesn't so image it was.
    Try harder - seriously.

    If you can't figure out what combination of ctrl-alt-meta allows you to copy the...
  11. You couldn't have compiled with debug enabled so...

    You couldn't have compiled with debug enabled so at least you get line numbers in your code.
    And as for posting an image of something you could copy/paste - pah!
    ...
  12. > I mean more practical way to learn how the...

    > I mean more practical way to learn how the instructions translate to binary like a specification,
    That information is in the processor reference manual (for whichever machine you're interested...
  13. Thread: Shell commands

    by Salem
    Replies
    3
    Views
    129

    -Werror is one way Redirecting the stderr of...

    -Werror is one way

    Redirecting the stderr of the compilation to a file, and checking whether that file is empty is another.
  14. > I would prefer something more practical cause...

    > I would prefer something more practical cause this will be a pain to do
    That's why we use assemblers and compilers, so we don't have to do that.

    But hey, you wanted to do it all by yourself.
  15. Thread: Shell commands

    by Salem
    Replies
    3
    Views
    129

    Look at $? gcc -g -Wall -Wextra -pedantic...

    Look at $?



    gcc -g -Wall -Wextra -pedantic -std=c11 try40.c -lm -o try40.out
    if [ $? -eq 0 ]; then ./try40.out ; fi
  16. Maybe this The elfutils project...

    Maybe this The elfutils project

    Dunno, it's one of those esoteric things to want to do.
    Like you're the maintainer for binutils and you're porting to a completely new architecture.

    Enjoy.

    $...
  17. Replies
    1
    Views
    158

    For something that simple, just use an inline...

    For something that simple, just use an inline function.


    static inline void exit_the_prog() {
    printf("Error: There was an error with the program");
    exit(2);
    }


    Templates are for...
  18. Replies
    1
    Views
    131

    Well posting what your 'Reversi_t' type looks...

    Well posting what your 'Reversi_t' type looks like would be a big help.
  19. Thread: Task creations

    by Salem
    Replies
    7
    Views
    265

    Sure, why not - let's see how far you can run...

    Sure, why not - let's see how far you can run with this.

    Your very basic task control block needs a few things
    - a task state, see FreeRTOS task states and state transitions described for ideas....
  20. Thread: Task creations

    by Salem
    Replies
    7
    Views
    265

    It's all in the previous threads.

    It's all in the previous threads.
  21. Thread: Task creations

    by Salem
    Replies
    7
    Views
    265

    You mean you got nothing from your previous...

    You mean you got nothing from your previous threads?
    How do you design scheduler ?
    Top design- real time operating system
    How to write code for round robin scheduling
    Free rtos code example 1...
  22. Replies
    5
    Views
    197

    codeblocks-20.03mingw-setup.exe is an all-in-one...

    codeblocks-20.03mingw-setup.exe is an all-in-one package.
    You just install it, and you get the compiler, debugger, editor all wrapped up for you.

    There is nothing else needed to start writing...
  23. Replies
    5
    Views
    197

    Eclipse is just an IDE. It doesn't come with a...

    Eclipse is just an IDE.
    It doesn't come with a compiler, hence the "g++ not found in PATH" messages.

    If you want an all-in-one complete package, try code::blocks.
    Binary releases - Code::Blocks...
  24. A couple of basic things first before trying more...

    A couple of basic things first before trying more advanced things.

    > fgets(hraci[id_hraca].meno,50,stdin);
    Don't lie about your buffer sizes.

    Use sizeof on the array you're reading into, like...
  25. Replies
    2
    Views
    153

    You could make a union out of it. typedef...

    You could make a union out of it.


    typedef struct
    {
    uint8_t type;
    uint8_t num;
    uint8_t id;
    union {
    int value;
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4