Search:

Type: Posts; User: rstanley

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    5
    Views
    272

    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...
  2. Replies
    15
    Views
    507

    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...
  3. Replies
    15
    Views
    507

    I would look at man 2 stat for starters.

    I would look at man 2 stat for starters.
  4. Replies
    7
    Views
    523

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

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

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

    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".
  8. Replies
    27
    Views
    1,770

    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...
  9. Replies
    2
    Views
    558

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

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

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

    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...
  14. Replies
    10
    Views
    826

    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...
  15. 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...
  16. 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,...
  17. 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...
  18. Replies
    8
    Views
    648

    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...
  19. 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
  20. Thread: C compiler

    by rstanley
    Replies
    3
    Views
    391

    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.
  21. Thread: C compiler

    by rstanley
    Replies
    3
    Views
    391

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

    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...
  23. Replies
    5
    Views
    869

    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!
  24. Replies
    5
    Views
    869

    Other errors when compiled in gcc v. 10.2.1:...

    Other errors when compiled in gcc v. 10.2.1:
    foo.c:31:20: warning: initialization of ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
    foo.c:33:33: warning: format...
  25. Replies
    5
    Views
    869

    You would first need to provide a sample data...

    You would first need to provide a sample data file so the code could be tested.
    Without compiling the code, the one thing I see is your call to strtok_r() on line 31. You need to pass the source...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4