Search:

Type: Posts; User: rstanley

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    274

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

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

    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".
  4. Replies
    27
    Views
    1,138

    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...
  5. Replies
    2
    Views
    469

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

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

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

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

    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...
  11. 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...
  12. 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,...
  13. 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...
  14. Replies
    8
    Views
    430

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

    by rstanley
    Replies
    3
    Views
    348

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

    by rstanley
    Replies
    3
    Views
    348

    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...
  18. Replies
    2
    Views
    420

    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...
  19. Replies
    5
    Views
    740

    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!
  20. Replies
    5
    Views
    740

    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...
  21. Replies
    5
    Views
    740

    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...
  22. Replies
    11
    Views
    2,609

    kixify: Please move this thread to the C++...

    kixify:

    Please move this thread to the C++ forum, as your code IS C++ and this C forum is for the discussion of C code only.

    Thank you!
  23. Replies
    11
    Views
    2,609

    No, plus you are in the wrong forum as your code...

    No, plus you are in the wrong forum as your code is C++, not C.
  24. All command line arguments ARE pass as "String"...

    All command line arguments ARE pass as "String" arguments, even numbers.

    int argc contains the number of strings on the command line. One for the program name (Usually) and one for each argument...
  25. You need to post your code in Code blocks so we...

    You need to post your code in Code blocks so we can see why you are "facing many errors".

    Make sure your warnings are turned on and set to highest warning level. Don't know what compier you are...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4