Search:

Type: Posts; User: rstanley

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds.

  1. If your compiler is using C Standard C99 or...

    If your compiler is using C Standard C99 or later, the you could add:

    #include <stdbool.h>
    which would allow the use of "bool" in your code, and provide the two values allowed in a bool variable,...
  2. Replies
    9
    Views
    182

    I strongly disagree. Warnings are there for a...

    I strongly disagree. Warnings are there for a reason! If you ignore a warning now, when your code is small, it might come back to bite you later as code is added, or worse, causes an intermittent...
  3. Seems to work for me.

    Seems to work for me.
  4. If the user is using mingw, then is it the mingw...

    If the user is using mingw, then is it the mingw libc (libm), or is it from the Mickey$oft C Runtime Library that mingw uses?

    I don't do programming on Windoze anymore, so I don't know.
  5. Replies
    4
    Views
    296

    Then this has nothing to do with C Programming. ...

    Then this has nothing to do with C Programming.

    In Windows:

    1) Open the file to read in one Notepad Window.

    2) Open a second window of Notepad, with a new file, or an existing file.

    3)...
  6. Replies
    4
    Views
    296

    Then you should not be attempting to write this...

    Then you should not be attempting to write this in C, or to get someone to program it for you for free!

    We are here to advise a programmer familiar with C, to identify the errors in their code,...
  7. Replies
    5
    Views
    462

    The posters here can help you with your code, but...

    The posters here can help you with your code, but you must make an effort to create the initial code. The only way you can learn to code in C is to write code yourself. Of course this is true with...
  8. Replies
    6
    Views
    404

    On top of that, your divide() function takes ints...

    On top of that, your divide() function takes ints and int pointers, however, in main() they are declared as doubles, except for the int reminder.

    You need to be consistent.
  9. Replies
    5
    Views
    453

    Did you mean "Merge" the two files or "Append"...

    Did you mean "Merge" the two files or "Append" them? A Merge usually implies some sort of Alphanumeric insertion.

    For data safety, especially during testing, I would recommend copying data from...
  10. Replies
    15
    Views
    666

    There is no concept of Drive Letters in Linux as...

    There is no concept of Drive Letters in Linux as there is in Windoze. All data storage devices are mounted in some path below the file system root '/'.

    If you pass a "Path" to stat, you will be...
  11. Replies
    15
    Views
    666

    I would look at man 2 stat for starters.

    I would look at man 2 stat for starters.
  12. Replies
    7
    Views
    586

    What course is this an assignment for? Have you...

    What course is this an assignment for? Have you taken any course in the C Programming Language?
  13. Replies
    7
    Views
    623

    Well your first issue is compiling under Windows...

    Well your first issue is compiling under Windows 10! ;^)

    But seriously, what version of gcc? "gcc --version"

    How did you install gcc? Mingw64, cygwin, other?

    What compile command? Did...
  14. Replies
    7
    Views
    623

    What compiler are you using? Your code works...

    What compiler are you using?

    Your code works correctly compiling with gcc on Debian Linux.

    #include <stdio.h>

    int main(void)
    {
    long double num = 50;
    printf("%Lf\n", num);
  15. Replies
    27
    Views
    2,162

    You have made the same mistake that many...

    You have made the same mistake that many beginners make, Code::Blocks is an IDE, NOT a compiler. Please read the entire Code::Blocks FAQ, especially the second link under "General".
  16. Replies
    27
    Views
    2,162

    Instead of "C++ for Dummies", you really need to...

    Instead of "C++ for Dummies", you really need to study a good book on the C Programming Language, cover to cover, and do all the exercises at the end of each chapter! Choose one of the three listed...
  17. Replies
    2
    Views
    636

    >> As per my understanding,its *(*ptr2+2) = 10...

    >> As per my understanding,its *(*ptr2+2) = 10
    >> Just want to confirm it.

    Why not code it yourself and test it? I did! ;^)
  18. Replies
    3
    Views
    883

    You cannot nest functions! "concatenate() MUST...

    You cannot nest functions! "concatenate() MUST be defined outside of main(), then called inside main().

    As written with this correction, you will need to #include:

    #include <string.h>...
  19. Have you studied Salem's solution carefully? If...

    Have you studied Salem's solution carefully? If not, please do.
  20. Please take a look at the following to see the...

    Please take a look at the following to see the difference between pre and post increment operators:

    #include <stdio.h>

    int main(void)
    {
    int x = 10;
    int y = 0;

    // Pre-increment
  21. Replies
    10
    Views
    995

    flp1969: Yes, if you run my program 10 times...

    flp1969:

    Yes, if you run my program 10 times within one second, yes, it will seed with the same value, but this is NOT how 99.999% of programs are run in real life!

    Considering the OP is a...
  22. Replies
    10
    Views
    995

    With a correct call to srand() with a unique...

    With a correct call to srand() with a unique value each time, you will get a different set of values from rand() each time. Only call srand() ONCE in the program!

    With no call to srand(), the...
  23. If this is an assignment, we are not here to do...

    If this is an assignment, we are not here to do your homework for you, either "skeleton code" or actual C code!

    You need to attempt to do at least a first cut of the program, then we can comment...
  24. Not enough information to know what "Position"...

    Not enough information to know what "Position" is.

    We don't know the size of str, buf, or fens, or what they contain.

    You need to provide a small complete program so we can compile and test,...
  25. Start here and note the changes I have made: ...

    Start here and note the changes I have made:

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

    //void extract_subnet(char ip_address[16], char *ip_subnet[12]);
    void...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4