Search:

Type: Posts; User: rstanley

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds; generated 4 minute(s) ago.

  1. Replies
    10
    Views
    208

    Strictly speaking, the is NO "void main()"!!! ...

    Strictly speaking, the is NO "void main()"!!! main() should ALWAYS returns an int to the operating system! This is defined by the operating system.

    We cannot make any assumptions about the next...
  2. Replies
    10
    Views
    208

    @shaswat The void before the function name...

    @shaswat

    The void before the function name means no value is returned from the function. Any other data type before the function name, indicates the type of data returned.

    The data type inside...
  3. Replies
    5
    Views
    152

    Three examples I can see used are, stubbing out...

    Three examples I can see used are, stubbing out code temporarily, header file choice, and inclusion of debug code during development:

    #ifdef DEBUG
    // Code with debug statements
    #else
    //...
  4. Replies
    5
    Views
    152

    Header files should contain extern function and...

    Header files should contain extern function and extern Global data declarations, #defines, other preprocessor directives, etc..., but not executable code such as the printf statement.

    I would...
  5. The api code is there, among the "21,300,000...

    The api code is there, among the "21,300,000 results", but what me be missing is the C code you need to call these api's!

    YOU have to write this code or look in Github, Sourceforge.net, or some...
  6. A simple Google search using "screen capture api...

    A simple Google search using "screen capture api windows" would bring up "About 21,300,000 results (0.64 seconds)".

    Start with the top and examine the first, and subsequent pages and see if any of...
  7. @gajya: You need to study a good book on the C...

    @gajya:

    You 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 below:

    C Programming, A...
  8. The asterisk '*' is used for two different places...

    The asterisk '*' is used for two different places and purposes.


    int *a = NULL;
    is used to create a pointer variable called a, initialized to NULL.


    a = malloc(sizeof(*a));
    This allocates...
  9. Thread: Help Required

    by rstanley
    Replies
    3
    Views
    181

    It is standard for all text files in UNIX or...

    It is standard for all text files in UNIX or Linux to always have a newline (Empty line) at the end of the file. Many utilities have problems with text files without the final newline.

    Most if...
  10. Replies
    5
    Views
    210

    A Google search...

    A Google search would bring up several options including this one, which seems to be well done. I have not tested it though.
  11. Replies
    2
    Views
    122

    Please compare Lines 9, and 16 in the code...

    Please compare Lines 9, and 16 in the code listing above.
  12. Why are the data strings, "01_01142020"? Isn't...

    Why are the data strings, "01_01142020"? Isn't that "MM_MMDDYYYY"? Seems like redundant redundancy!

    Why do you need the leading "MM_"? Why not just use the final 8 digits, "MMDDYYYY"? It is...
  13. Replies
    3
    Views
    204

    If so, no one here will do your homework for you!...

    If so, no one here will do your homework for you! YOU have make an attempt to code a solution with the skills you have been taught in class. Then post the code here with questions, and we can...
  14. Replies
    4
    Views
    305

    You might be copying from an IDE. Make sure you...

    You might be copying from an IDE. Make sure you are using plain text, not with IDE formatting.



    For main(), the two are effectively equivalent. For all other functions you create, there is a...
  15. Replies
    4
    Views
    305

    First of all, format your code properly. ...

    First of all, format your code properly. Functions are not one liners.
    Compile and run this version of the function. What do you think will happen, providing the file does exist?

    You will need...
  16. I once reviewed a book for potential use in a...

    I once reviewed a book for potential use in a course on C. The book was not just badly written, some of the text and code were plain WRONG! Please recycle the book you currently have.

    Please see...
  17. Replies
    4
    Views
    166

    Have you studied the chapter on functions, as...

    Have you studied the chapter on functions, as well as all the chapters that came before? If so you should have all the information you need to do the exercise.

    If you need a better book on C, can...
  18. A variable definition is usually also a...

    A variable definition is usually also a declaration, unless an extern declaration has already been seen by the compiler.

    #include <stdio.h>

    extern int z; // Declaration only, not a definition...
  19. Replies
    4
    Views
    183

    Please post the code you have done, so far, using...

    Please post the code you have done, so far, using [ CODE ] tags, so we can comment on it and guide you for the next steps. Please don't post a link to the code.

    Please read the FAQ at the top of...
  20. You placed a '{' char before main() not after.

    You placed a '{' char before main() not after.
  21. Also look at the printf() statement for the 2nd...

    Also look at the printf() statement for the 2nd child and find the extraneous " in the data.
  22. Replies
    2
    Views
    206

    Without seeing the code we cannot comment on the...

    Without seeing the code we cannot comment on the error.

    Why would you need an alternative to string.h?

    Turn on your warnings in the compiler, and turn up the warning level to the highest level....
  23. Replies
    2
    Views
    189

    If you are correcting/maintaining an existing C...

    If you are correcting/maintaining an existing C application, or adding some functionality, you should use the Standard that was used to compile that app. Check the Makefile or documentation to...
  24. Replies
    1
    Views
    147

    You don't "have" to put anything in a header file...

    You don't "have" to put anything in a header file you create, if your program consists of only one .c file.

    If your program has multiple .c files with function definitions and function calls in...
  25. They are two different variables, the local in...

    They are two different variables, the local in the stack segment, and the global in the global data segment! The local will HIDE the global of the same name, and you, or someone else maintaining...
Results 1 to 25 of 498
Page 1 of 20 1 2 3 4