Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.38 seconds; generated 8 minute(s) ago.

  1. Replies
    1
    Views
    69

    First off, indent...

    First off, indent your code.


    #include<stdio.h>
    #include<math.h>

    int inrange(int, int, int, int);
    int cubesum(int, int, int, int);
    int avsqrsum(int, int, int, int);
    int squaresum(int, int,...
  2. Replies
    4
    Views
    179

    Probably the easiest thing to do is to use fgets...

    Probably the easiest thing to do is to use fgets instead of fscanf


    char buff[BUFSIZ];
    while ( fgets(buff, BUFSIZ, f) ) {
    if(sscanf(buff, "%f,%f,%f,%f", &x[n][0], &x[n][1], &x[n][2],...
  3. Replies
    9
    Views
    377

    > I completely understand pointer, dynamic memory...

    > I completely understand pointer, dynamic memory allocation and structure.
    But the list you create in post #4 contains a garbage node at the end of your list.
    If you want to have a more complete...
  4. > code works, what would be a better way to write...

    > code works, what would be a better way to write the sqrt_function?
    Only by dumb luck.



    double sqrt_function (double number)
    {
    double answer = sqrt (number);// you were just ignoring...
  5. Google translate says 1. This is an English...

    Google translate says

    1. This is an English speaking forum.
    2. You need to at least make some effort to solve the problem (more than just copy/pasting from your assignment).
  6. You're printing values, not addresses. Like...

    You're printing values, not addresses.

    Like this:
    printf("spvar -> var1 store at memory location -> %p \n", (void*)&spvar -> var1);
  7. Replies
    5
    Views
    132

    Code should be copy/pasted between tags....

    Code should be copy/pasted between
    tags.
    Fuzzy pictures on temporary external sites don't allow us to test your code, or for people in the future to even see your code.
  8. Maybe you could edit your post so it doesn't have...

    Maybe you could edit your post so it doesn't have all that markup nonsense.
  9. Replies
    5
    Views
    279

    Huh? It goes 1,2,3,1,2,3,1,2,3 and so on. ...

    Huh?
    It goes 1,2,3,1,2,3,1,2,3 and so on.

    What did you expect to see?

    You're not going to see exactly equal numbers of each task printed.

    For a start, it's a fair bet that vPrintString()...
  10. Replies
    5
    Views
    279

    > I am trying to figure out how scheduler works...

    > I am trying to figure out how scheduler works in the following code
    Either
    - read the design documentation of freeRTOS.
    - read the source code of freeRTOS.

    Attempting to reverse engineer the...
  11. HTTP/2 connection preface in native C...

    HTTP/2 connection preface in native C
    3 years ago, you seemed to know quite a lot.
    Ever since, it's just been aimless drifting from one random topic to another.
  12. Replies
    16
    Views
    531

    So that's no then. What you're saying is that...

    So that's no then.

    What you're saying is that your local directories contain the ONLY copy of your code.
    You have no means of comparing two versions (one working, one not working).
    You have no...
  13. Replies
    16
    Views
    531

    I meant this -> Version control - Wikipedia...

    I meant this -> Version control - Wikipedia

    If you can't track changes, have 'development' for what you're working on, 'release' for stuff that works and 'experimental' for stuff you might end up...
  14. Replies
    16
    Views
    531

    I suppose it's too late to ask if you've got a...

    I suppose it's too late to ask if you've got a source control system like git / perforce / cvs in place.
  15. Thread: C Board is 20

    by Salem
    Replies
    1
    Views
    187

    C Board is 20

    Just over 20 years ago, the current incarnation of the forum rose from the ashes of the old UltraBoard

    Wondering if there is anyone else from those early times still around.
  16. Replies
    2
    Views
    250

    So do you have a cmotionplanner.cpp file? Are...

    So do you have a cmotionplanner.cpp file?

    Are you compiling it?

    > undefined reference to
    These typically result from
    - not compiling all your source code
    - not being able to spell correctly.
  17. Replies
    16
    Views
    531

    > If you can look the error console is saying...

    > If you can look the error console is saying 'CAN_Module.obj' failed. I cant see any .obj file in my Debug folder. What do you think?
    Well you don't get an obj file if the compile step failed, so...
  18. > char* data = (char*)malloc(length); If you're...

    > char* data = (char*)malloc(length);
    If you're writing C, then you don't need this cast.

    If your source files are the default .cpp file type that VS gives you, then you're compiling C++ code and...
  19. Well if you want people to PM you, you need to...

    Well if you want people to PM you, you need to enable that in your profile.
  20. > I am not thinking of making real time operating...

    > I am not thinking of making real time operating system.
    Oh yes you are.

    > I want to write code for round robin scheduling

    Without a scheduler, your code runs like this.


    P1();
    P2();
  21. Why are you trying to write your own, when there...

    Why are you trying to write your own, when there are many open source ones -> OSRTOS
  22. Replies
    2
    Views
    304

    Are you a bot? Because you're not learning...

    Are you a bot?

    Because you're not learning anything by posting random one-line questions, and never responding to any of the answers.

    16385

    You've only ever asked one question that was...
  23. Replies
    1
    Views
    269

    1. Indentation, apply one style consistently. ...

    1. Indentation, apply one style consistently.


    #include <stdio.h>
    #include <stdlib.h>

    #define FIT_TEST(a,b) (a.x > b.x && a.y > b.y && a.z > b.z)

    struct box {
    float x, y, z;
  24. Replies
    4
    Views
    264

    Have you ever designed and written any program...

    Have you ever designed and written any program consisting of more than one file and taking longer than a week to complete from start to end?

    If you haven't, an RTOS is a tough choice.

    > Can you...
  25. Thread: Word Counting

    by Salem
    Replies
    10
    Views
    521

    It would seem to me the first sub-task of this is...

    It would seem to me the first sub-task of this is to just find the common words.
    Then worry about the total count.
    Then worry about sorting by count.
Results 1 to 25 of 490
Page 1 of 20 1 2 3 4