Search:

Type: Posts; User: MC++

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,035

    Thank you so much nonoob. :) Problem solved. ...

    Thank you so much nonoob. :)
    Problem solved.

    edit:
    Thank you as well anduril462, I appreciate it regardless :P
  2. Replies
    4
    Views
    1,035

    Trouble using strings when calling functions

    Hello again,

    I've got another issue. This time I'm having trouble calling a function and the problem lies in the string (char) variables.
    The errors I get when trying to compile:
    126:1 [Warning]...
  3. Replies
    13
    Views
    2,453

    Well after I stopped using the array for prate,...

    Well after I stopped using the array for prate, yes. Everything is working as it should I was just trying to figure out if I could store the prate values in its own array, but after looking at what...
  4. Replies
    13
    Views
    2,453

    What do you mean? Paygroup is decided based on...

    What do you mean? Paygroup is decided based on what is scanned from a file.

    For example:
    0001:Johnson:Joe:6:38.0

    See that '6' after Joe: ? That's the paygroup, however because that is the...
  5. Replies
    13
    Views
    2,453

    The odd thing was that for the very last output...

    The odd thing was that for the very last output it actually gave a number, but it was still incorrect. Every other time it was 0, yes. The problem I think was that the for loop was confused due to...
  6. Replies
    13
    Views
    2,453

    Most of the code: void payrate(double...

    Most of the code:


    void payrate(double *rate);
    void Summary();

    main()
    {

    FILE *fp2;
  7. Replies
    13
    Views
    2,453

    Yes prate is an array of doubles. nonoob, I...

    Yes prate is an array of doubles.

    nonoob, I saw that mistake. But it's not necessarily relevant because nothing else is working either.
  8. Replies
    13
    Views
    2,453

    Trouble with assignment to arrays

    Hey guys, got a quick problem. I'm having trouble assigning the correct value to an array variable. It's just outputting 0.

    edit:
    I realized the problem. It's the fact that prate[n] gets messed...
  9. I'm sorry to bother you so much, but can you give...

    I'm sorry to bother you so much, but can you give me an example if mine is wrong?

    is it simply:
    array[0] == array[1]

    Thank you so much for all your help today Quzah. You are like a wizard, and...
  10. I already changed the array size to 10. Took care...

    I already changed the array size to 10. Took care of that one a while ago, sorry I didn't mention that.

    Can you help me with my latest issue? Around 2 posts prior to yours.
  11. Okay Mr.Quzah I think I figured that out but I've...

    Okay Mr.Quzah I think I figured that out but I've got another question for you:

    Right now I have a "paygroup" and "payrate".

    Now, for example:
    Payrate 1 is 7.75
    Payrate 2 is 8.00

    Here's...
  12. But how do I pass the arrays when I call the...

    But how do I pass the arrays when I call the function in main? I'm not understanding this part.

    Here is my code:


    void payrate(double *rate);
    void Summary();

    main()
    {
  13. Replies
    9
    Views
    1,274

    I actually changed it anyway. Thanks for the tip...

    I actually changed it anyway. Thanks for the tip brother! Congrats on your 1,000th post btw. I'm honored to have received it in my thread :P
  14. Replies
    9
    Views
    1,274

    OMG! Thank you so much. The funny thing is I had...

    OMG! Thank you so much. The funny thing is I had the 2-dimensional array idea in my mind but I am afflicted with such terrible memory that I actually forgot about it and never tried it until you...
  15. Replies
    9
    Views
    1,274

    Okay, here is most of my code: main() { ...

    Okay, here is most of my code:


    main()
    {

    FILE *fp1;
    FILE *fp2;
    int i, n;
    double payrate[10];
  16. Replies
    9
    Views
    1,274

    Thank you very much for the response. My code...

    Thank you very much for the response. My code looks like this now:


    for(n=0;n<6;n++){
    fscanf(fp2, "%d:%[^:]:%[^:]:%d:%lf\n", &empnum[n], lastn[n], firstn[n], &paygroup[n], &hours[n]);
    ...
  17. Replies
    9
    Views
    1,274

    Having problems with fscanf for strings

    I'm having a lot of trouble today unfortunately.

    I've got another issue now. I need help with scanning and recording strings in a file.

    The file looks something like this:...
  18. I've tried the change you mentioned but it's...

    I've tried the change you mentioned but it's still not working. The code is now:


    void payarray(double *payrate[10]);
    void Summary();

    main()
    {
    double payrate[10];
    int n;
  19. expected 'double **' but argument is of type 'double *'

    I'm lost here and I don't really understand what the problem is. If someone could point it out real quick I'd be very grateful!



    void payarray(double *payrate[10]);
    void Summary();

    main()...
  20. Replies
    3
    Views
    1,197

    Even when I put the ampersand into the fscanf the...

    Even when I put the ampersand into the fscanf the readouts are still always 0.00

    Right now I'm just trying to get a single one working. I know I need to make it into a for loop.

    Is there any...
  21. Replies
    3
    Views
    1,197

    Reading from file and output; fscanf/printf

    Hello everyone, right now I'm having some trouble with reading data from a file (just a .txt).

    So far what I've got is:



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

    main()
  22. Replies
    8
    Views
    1,626

    Basically the program operates like this: ...

    Basically the program operates like this:

    Enter value for Vowels: %d \n
    Enter value for Consonants: %d \n

    Enter string: %s \n

    Total for vowels: %d \n
    Total for consonants: %d \n...
  23. Replies
    8
    Views
    1,626

    Thank you for the response, Niara. It sheds a...

    Thank you for the response, Niara. It sheds a little light, but I am still very new to C programming unfortunately and so I am still a little lost.

    Is there a resource you can guide me to that...
  24. Replies
    8
    Views
    1,626

    Counting characters based on certain parameters

    Hello guys,

    I was wondering, how do you build a program that will assign certain values to certain characters and different values to others?

    For example, if I wanted to assign a value of 1 to...
  25. I might have forgotten to include something in...

    I might have forgotten to include something in the code I uploaded here, but it compiles fine on my end and I've actually solved the problem.

    I am unable to edit my initial post anymore due to the...
Results 1 to 25 of 43
Page 1 of 2 1 2