Search:

Type: Posts; User: caduardo21

Page 1 of 9 1 2 3 4

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

  1. ItIsStrings is a local variable that goes out of...

    ItIsStrings is a local variable that goes out of scope as soon as MyFunction returns. You should either pass MyFunction a pointer to an array of characters or declare ItIsString as static.
  2. Replies
    16
    Views
    3,618

    The directory I tried to delete was empty but...

    The directory I tried to delete was empty but remove still did not work.
  3. Replies
    16
    Views
    3,618

    It does work on Linux and Unix-like systems...

    It does work on Linux and Unix-like systems because everything is considered a file on such machines. Windows makes a distinction between files and directories so I guess that is why it didn't work...
  4. Replies
    16
    Views
    3,618

    Question about the remove function

    In ANSI C, does the remove funcion also work with directories? I'm having this ongoing discussion on this matter at another board where I was told it does but when I tried it it didn't work and I...
  5. Replies
    9
    Views
    1,427

    Try this: scanf("%c%*c",&choice);

    Try this:


    scanf("%c%*c",&choice);
  6. Replies
    18
    Views
    3,182

    The C Programming Language 2nd Edition is a great...

    The C Programming Language 2nd Edition is a great book. Go ahead and continue reading it. Just make sure you explicit declare the main function returning an int and write "return 0;" before its...
  7. Replies
    1
    Views
    867

    Read a line from the file into a character buffer...

    Read a line from the file into a character buffer and use the strchr function from string.h to get a pointer to that tab.


    char line[MAXLINE];
    /* read a line from the file into line */
    char *p...
  8. Replies
    15
    Views
    2,597

    The reason is that EOF does not fit in a char...

    The reason is that EOF does not fit in a char variable. How would we distinguish a real character from end-of-file if it did?
  9. Replies
    15
    Views
    2,597

    int get_num_lines(FILE *streamp) { int...

    int
    get_num_lines(FILE *streamp)
    {
    int num_lines = 0;
    char ch, prev = NEWLINE;

    while((ch = fgetc(streamp)) != EOF)
    {
    if(ch == NEWLINE)
    {
  10. Replies
    1
    Views
    1,296

    How come this works?

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

    struct node {
    void *data;
    struct node *next;
    };

    struct node *rootp = NULL;
  11. Thread: string!

    by caduardo21
    Replies
    6
    Views
    1,137

    Try subtracting '0' from all the values in...

    Try subtracting '0' from all the values in printf().
    a - '0', b - '0', and so on...
  12. What version of the book are you refering to? I...

    What version of the book are you refering to? I opened my The C Programming Language 2nd Edition book on page 54 and there's no binary search implementation on that page...
  13. Thread: Arrays in C

    by caduardo21
    Replies
    3
    Views
    1,101

    http://www.cppreference.com/stdmem/malloc.html ...

    http://www.cppreference.com/stdmem/malloc.html

    This should help you.
  14. Replies
    4
    Views
    1,820

    Is this undefined behaviour?

    #include <stdio.h>

    int main(void)
    {
    char v[] = "blablabla";

    v[0] = 'b';

    return 0;
    }
  15. Replies
    2
    Views
    947

    INPUT structure

    I am trying to declare an array of structures of type INPUT like this and I get the following errors:


    #include <windows.h>

    INPUT a[2];

    error C2065: 'INPUT' : undeclared identifier
    error...
  16. Replies
    8
    Views
    5,448

    I tried this without success #include...

    I tried this without success


    #include <stdio.h>
    #include <windows.h>

    int main(void)
    {
    ShellExecute(NULL, "open", "www.google.com", NULL, NULL, SW_MAXIMIZE);
    HWND IEHwnd =...
  17. Replies
    8
    Views
    5,448

    Cool-August, that was exactly what I used :D I...

    Cool-August, that was exactly what I used :D
    I know about the Spy++ tool that comes with Visual C++ :)

    Speaking of that, I have another (big) problem. That a look at this picture, please:...
  18. Replies
    2
    Views
    1,565

    Simulate Start->Run->OK

    If I click on Start->Run type in something like www.google.com and hit OK, google will open on the default browser. I was wondering how to simulate that programatically. Does anyone know? Thank you.
  19. Replies
    8
    Views
    5,448

    Tonto, thanks a lot man!

    Tonto, thanks a lot man!
  20. Replies
    3
    Views
    1,433

    Dynamically allocated memory question

    Consider this:


    int i;
    char *v[MAXELEMENTS];

    for (i = 0; i < MAXELEMENTS; i++) {
    if ((v[i] = malloc(blablabla)) == NULL) {
    printf("error\n");
    while (--i >= 0)
  21. Replies
    8
    Views
    5,448

    Close IE programmatically

    I am able to open a website with IE using the ShellExecute function but after doing some stuff, I need to close it. How can I do that programmatically? I tried passing the verb "close" to...
  22. Thread: Linkage

    by caduardo21
    Replies
    1
    Views
    1,268

    Linkage

    I'm reading a book called Pointers on C and I believe I have found an error but I just want to make sure before contacting the author. Consider this piece of code:


    typedef char *a;
    int b;
    int...
  23. Replies
    9
    Views
    1,875

    I've been reading, I've been reading... ;)

    I've been reading, I've been reading... ;)
  24. Replies
    9
    Views
    1,875

    I can see that Dave's coloring abilities really...

    I can see that Dave's coloring abilities really got to quzah :D
  25. Replies
    7
    Views
    1,124

    It is not confusing, it's just a matter of...

    It is not confusing, it's just a matter of reading the function's definition and understanding it. :p

    I'm talking like that because I think I finally get it lol.
Results 1 to 25 of 204
Page 1 of 9 1 2 3 4