Search:

Type: Posts; User: bluej322

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Ahhh, i did leave out that essential malloc()......

    Ahhh, i did leave out that essential malloc()... But why use the . instead of ->?
  2. How to edit the values of an array in a struct?

    Hi. This code:



    struct node {
    int data[10];
    };

    int main()
    {
  3. Replies
    2
    Views
    837

    I played around with it and i just realized the...

    I played around with it and i just realized the obvious, you can use a variable name in place of the file path.




    char fName[50] = "/users/me/desktop/test.txt";
    FILE *handle =...
  4. Replies
    2
    Views
    837

    fopen() versatility?

    Hi, i was wondering if there is a way to use a specifier in fopen() or another file opening function so that the file name can be variable.
    I know this won't work (as far as i know), but this is the...
  5. Replies
    14
    Views
    1,530

    I commend your google prowess. Thank you.

    I commend your google prowess. Thank you.
  6. Replies
    14
    Views
    1,530

    Yes, i understand that. As far as my googling...

    Yes, i understand that. As far as my googling abilities go, i can't find a data size that can support 50-digit numbers. That's why i'm here; maybe in all of your infinite wisdom you can provide a...
  7. Replies
    14
    Views
    1,530

    soooooo, does anyone actually have a solution for...

    soooooo, does anyone actually have a solution for this problem... or is everyone going to brush off the issue with ridicule
  8. Replies
    14
    Views
    1,530

    And i'm having the same problem with strtod()...

    And i'm having the same problem with strtod() too...



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

    int main ()
    {
    char test[55] = "82738293728298329381",*end;
  9. Replies
    14
    Views
    1,530

    atof() trouble

    Hi, i'm using atof() in a larger program but the simple program below illustrates the same problem.



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

    int main ()
    {
    char test[55] =...
  10. Replies
    6
    Views
    1,165

    Data Type Trouble

    Hi, i'm writing a program that calculates the sum of all primes below a number x.
    Here's the problem, when I find the sum of all primes below a large number, say 2 million, the program truncates...
  11. Replies
    6
    Views
    1,666

    Oh yeah, and how can i run executable files with...

    Oh yeah, and how can i run executable files with C?
  12. Replies
    23
    Views
    2,410

    Oh, I'm sorry. I neglected to say that it has to...

    Oh, I'm sorry. I neglected to say that it has to go from the top left to the bottom right position of the matrix.
  13. Replies
    23
    Views
    2,410

    I am using an array, a multidimensional array....

    I am using an array, a multidimensional array. Yes, it is related but I'm not sure that it's identical.
  14. Replies
    23
    Views
    2,410

    Haha, i know, i really should. I can put the...

    Haha, i know, i really should.
    I can put the data in a multidimensional array without a problem. The issue is calculating all paths and storing the data. Maybe i misunderstood what you're saying?
  15. Replies
    23
    Views
    2,410

    Could you show me an example of this?

    Could you show me an example of this?
  16. Replies
    23
    Views
    2,410

    I did just that. The code below isn't complete,...

    I did just that.
    The code below isn't complete, i realized that the path algorithm would only detect shortest routes adjacent to the current position, thus failing in the first example matrix in my...
  17. Replies
    23
    Views
    2,410

    You're right, I've used linked lists once but I...

    You're right, I've used linked lists once but I didn't see the dynamic capabilities. In fact, the measly code below is all i have done with linked lists. What i don't understand is how i can declare...
  18. Replies
    23
    Views
    2,410

    C fastest path problem

    Hi, my current C project is a program that looks at a text file with a matrix inside. The format of the matrix is like so:
    1,2,5,6
    5,6,7,8
    1,8,7,9
    1,1,3,2:
    The matrix can be comprised of ANY set...
  19. Replies
    6
    Views
    1,666

    General C questions

    Hi, i have a few C questions that are nagging me:

    1) Why don't I need to place a '&' before strings when using scanf()?

    2) How can access individual characters in an integer? (e.g. - find the...
  20. Replies
    4
    Views
    1,898

    wow, that deserves a facepalm. Thanks!

    wow, that deserves a facepalm. Thanks!
  21. Replies
    4
    Views
    1,898

    Removing an array in an element?

    Hi, i was wondering if there is a way to remove the element of an array. For example, in the following code i am using the one array to temporarily store multiple sets of data. The problem is that if...
  22. Replies
    1
    Views
    1,819

    Character Histogram Trouble

    Hi, i'm writing a fairly simple program that asks for input and prints out "|" for each occurrence of a character. Right now it can distinguish letters/numbers but once i try to get it to check for...
  23. Replies
    17
    Views
    2,657

    Yes, i implied that when i said "i neglected the...

    Yes, i implied that when i said "i neglected the fact that there is the null terminating character at the array index of strlen()".
    I understand that it took the null character at the end of line...
  24. Replies
    17
    Views
    2,657

    yes, i neglected the fact that there is the null...

    yes, i neglected the fact that there is the null terminating character at the array index of strlen().

    one question though, i tried adding the '\0' onto the end of nLine and it worked as...
  25. Replies
    17
    Views
    2,657

    thanks, i tried exactly what you suggested and it...

    thanks, i tried exactly what you suggested and it seems to be functioning.
Results 1 to 25 of 37
Page 1 of 2 1 2