Search:

Type: Posts; User: rstanley

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds; generated 41 minute(s) ago.

  1. Replies
    5
    Views
    125

    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...
  2. Replies
    6
    Views
    143

    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.
  3. Replies
    5
    Views
    302

    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...
  4. Replies
    15
    Views
    534

    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...
  5. Replies
    15
    Views
    534

    I would look at man 2 stat for starters.

    I would look at man 2 stat for starters.
  6. Replies
    7
    Views
    537

    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?
  7. Replies
    7
    Views
    502

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

    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);
  9. Replies
    27
    Views
    1,880

    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".
  10. Replies
    27
    Views
    1,880

    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...
  11. Replies
    2
    Views
    575

    >> 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! ;^)
  12. Replies
    3
    Views
    743

    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>...
  13. Have you studied Salem's solution carefully? If...

    Have you studied Salem's solution carefully? If not, please do.
  14. 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
  15. Replies
    10
    Views
    870

    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...
  16. Replies
    10
    Views
    870

    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...
  17. 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...
  18. 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,...
  19. 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...
  20. Replies
    8
    Views
    705

    Then you need to go back and thoroughly study C....

    Then you need to go back and thoroughly study C. Function prototypes are part of the chapter on functions in any book on the C Programming Language. You would have learned about the three major...
  21. You are in the wrong forum as your code is C++...

    You are in the wrong forum as your code is C++ NOT C.

    C++ Forum
  22. Thread: C compiler

    by rstanley
    Replies
    3
    Views
    404

    gcc & clang are at the top of the list. I can't...

    gcc & clang are at the top of the list. I can't offer recommendations on any others. I would avoid Microsoft Visual Studio.
  23. Thread: C compiler

    by rstanley
    Replies
    3
    Views
    404

    You don't already have a compiler installed? ...

    You don't already have a compiler installed?

    If you have any Dsitro of Linux you have gcc installed or easily installed from your Distro's package manager.

    If Windows, Mac, or some other hosted...
  24. Replies
    2
    Views
    520

    Your question is a little too vague. You don't...

    Your question is a little too vague. You don't like gnuplot but don't say why. We don't know what kind of "data" you will be receiving, or your other requirements.

    Your first start would be a...
  25. Replies
    5
    Views
    899

    Make sure you turn on Warnings, and insure your...

    Make sure you turn on Warnings, and insure your warning level is turned up to the highest level to see all warnings and errors in your code!
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4