Search:

Type: Posts; User: goran00

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thread: struct

    by goran00
    Replies
    5
    Views
    1,290

    struct

    I have the following program. Everything seems ok, the only problem is that the wight always prints 0.
    How can i fix that


    #include <time.h>
    #include <stdio.h>
    #include <stdlib.h>
    #define...
  2. Replies
    3
    Views
    1,474

    what should I have it output instead of c. strg?

    what should I have it output instead of c. strg?
  3. Replies
    3
    Views
    1,474

    comparing strings.

    I am making a program that will check a documents nd print the number of times that it had the word 'pets'.
    The program runs ok, but it prints: I got the word: <null>.
    The code is included...
  4. Replies
    4
    Views
    1,292

    i also tried inputText with no luck

    i also tried inputText with no luck
  5. Replies
    4
    Views
    1,292

    so how would i go about fixing that i tried...

    so how would i go about fixing that
    i tried using c and c* and thats not working
  6. Replies
    4
    Views
    1,292

    Counting words in a file

    I am using the following program to print the document GPA.txt and to figure out how many times the word "pets" is in that document.
    I manually counted it and it's in there 4 times.
    The document...
  7. Replies
    7
    Views
    9,092

    smiley faces ????

    Hello,
    I am trying to make my program read a file thats on my desktop.
    When I run the code all I get is smiley faces.
    What is the problem with my code?



    #include <stdio.h>
    #include...
  8. Thread: random

    by goran00
    Replies
    2
    Views
    1,169

    random

    i am trying to run the following program, but for some reason it does not genetare random numbers, it always gives me the same number ( i believe its the lowest negative number that c has).
    How do I...
  9. Thread: foo

    by goran00
    Replies
    6
    Views
    2,174

    i am sorry to keep bothering you but i am very...

    i am sorry to keep bothering you but i am very new to this whole programing thing.
    do i use void instead of double*
  10. Thread: foo

    by goran00
    Replies
    6
    Views
    2,174

    i got the prototype down and i indented, and I am...

    i got the prototype down and i indented, and I am trying to figure out why it still tells me that foo is not a function?



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

    double* makeAnArray(double...
  11. Thread: foo

    by goran00
    Replies
    6
    Views
    2,174

    foo

    i am trying to run the following program and i keep getting a compiling error that says that foo is not a function. What am I doing wrong?



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

    double*...
  12. Thread: calloc

    by goran00
    Replies
    27
    Views
    5,572

    what is it used for? when do you use it? what is...

    what is it used for? when do you use it? what is the purpose of it???
  13. Thread: calloc

    by goran00
    Replies
    27
    Views
    5,572

    thanks for help just a quick question...

    thanks for help
    just a quick question
    fflush(stdout);
    what is this? what does it do?
  14. Thread: calloc

    by goran00
    Replies
    27
    Views
    5,572

    what is foo?????

    what is foo?????
  15. Thread: calloc

    by goran00
    Replies
    27
    Views
    5,572

    if i swich the two lines of the code return...

    if i swich the two lines of the code


    return 0;
    free(makeAnArray);

    it seems to work. The question that I have is if I am using the right array makeAnArray or is it supposed to be anArray...
  16. Thread: calloc

    by goran00
    Replies
    27
    Views
    5,572

    I have searched online read books and I can not...

    I have searched online read books and I can not figure out how to this.
    can you shouw me an example of it. I do not recall an example of this.
  17. Thread: calloc

    by goran00
    Replies
    27
    Views
    5,572

    i have been strugling with this for quite a few...

    i have been strugling with this for quite a few days now. This is my first time using c so I am having an extremely hard time with it. I understand that you have been telling me the same thing...
  18. Thread: calloc

    by goran00
    Replies
    27
    Views
    5,572

    i have been through my book and that was no help...

    i have been through my book and that was no help at all.
    from what i get from it is that the array size has to be declared at he beggining and cannot be changed, but how am i supposed to have the...
  19. Thread: calloc

    by goran00
    Replies
    27
    Views
    5,572

    i made all the corrections and it is still not...

    i made all the corrections and it is still not working
    this is the errror that i get
    Windows has triggered a breakpoint in Assignment 8.1.exe.

    This may be due to a corruption of the heap, which...
  20. Thread: calloc

    by goran00
    Replies
    27
    Views
    5,572

    i fixed int anArray[]={0} in the...

    i fixed


    int anArray[]={0}

    in the declarations
    now when i run the program i get an error msg what is wrong with it?
  21. Thread: calloc

    by goran00
    Replies
    27
    Views
    5,572

    calloc

    i am trying to make an array where user choses the size, and i dont seen able to get it right. What am I doing wrong?



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

    double* makeAnArray(double...
  22. Thread: size of array

    by goran00
    Replies
    38
    Views
    7,068

    i changed that to free(array) but the problem i...

    i changed that to free(array)
    but the problem i am having with that is
    error C2072: 'array' : initialization of a function
    here is the code. How can i fix that


    #include <stdio.h>
    #include...
  23. Thread: size of array

    by goran00
    Replies
    38
    Views
    7,068

    i changed everything over to doubles not when i...

    i changed everything over to doubles
    not when i run the program i get this error box:
    Windows has triggered a breakpoint in Assignment 8.1.exe.

    This may be due to a corruption of the heap, which...
  24. Thread: size of array

    by goran00
    Replies
    38
    Views
    7,068

    what would i have to keep as an int since size is...

    what would i have to keep as an int since size is going into the function as an int???
    or could i just make everyhting a double?
  25. Thread: size of array

    by goran00
    Replies
    38
    Views
    7,068

    i am not understand this, i understand what you...

    i am not understand this, i understand what you are saying but where am i making the mistake?
Results 1 to 25 of 124
Page 1 of 5 1 2 3 4