Search:

Type: Posts; User: JDGATX

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thanks for the ideas here.

    Thanks for the ideas here.
  2. MENSA Puzzle Solver: Question on char arrays and passing to/from functions

    MENSA puts out these weekly word puzzles. For whatever reason I decided to try and write something which would solve them. The puzzles take the following format:

    ... where the underscore...
  3. Replies
    80
    Views
    31,920

    My version would not compile without the...

    My version would not compile without the prototypes, so I was throwing that in there.

    I didn't have any real substance to offer up, just cosmetic changes to better the code.
  4. Replies
    80
    Views
    31,920

    A few things that I've noticed. You need...

    A few things that I've noticed.

    You need function prototypes declared at the top of your source.


    int readDataAndWriteRecords(void);
    Student* getOneStudentFromData(void);
    void...
  5. Don't use fflush(stdin). Undefined behavior.

    Don't use fflush(stdin). Undefined behavior.
  6. Thread: C programing

    by JDGATX
    Replies
    2
    Views
    2,023

    Show some code and some effort, please.

    Show some code and some effort, please.
  7. Replies
    12
    Views
    15,470

    I'm missing a lot of things on this post. I'll...

    I'm missing a lot of things on this post. I'll slink back to the darkness.
  8. Replies
    6
    Views
    1,436

    Try %f.

    Try %f.
  9. Replies
    12
    Views
    15,470

    Run a search for fopen(). This function...

    Run a search for fopen(). This function establishes your file pointer, which is FILE * in type.
  10. Replies
    12
    Views
    15,470

    Good catch. My apologies.

    Good catch. My apologies.
  11. Replies
    12
    Views
    15,470

    You're just missing a closing curly brace for...

    You're just missing a closing curly brace for this statement:


    if ( bytes > 0 )


    ...inside your while(!eof) loop, which, incidentally, is not the correct way of using EOF to control a loop....
  12. Thread: plz help!

    by JDGATX
    Replies
    7
    Views
    1,595

    Search the forum. This exact question has been...

    Search the forum. This exact question has been asked prior and solved.
  13. Replies
    9
    Views
    1,995

    That's all fine and good that you don't need to...

    That's all fine and good that you don't need to submit your main() to your teacher, but you won't be able to test your function in any compiler without giving it a main().
  14. Replies
    9
    Views
    1,995

    You have to have a main function. Something like...

    You have to have a main function. Something like this:



    int main(void)
    {
    int a;
    int b;
    int w;
    int n_a;
  15. Replies
    5
    Views
    1,381

    Where do you actually populate str? And I...

    Where do you actually populate str?

    And I don't think that's the correct call of sprintf(), but I'm unsure from memory.
  16. Replies
    10
    Views
    1,350

    We see this problem rise up with argc and argv,...

    We see this problem rise up with argc and argv, where argv is the collection of arguments stored as char** and argc acts as the counter of arguments in the char**.
  17. Thread: Char to int!!

    by JDGATX
    Replies
    10
    Views
    1,581

    atoi() takes char *, not char. Which is to say,...

    atoi() takes char *, not char. Which is to say, it takes a string.
  18. Replies
    8
    Views
    2,266

    You need a semicolon in your .h file after your...

    You need a semicolon in your .h file after your function prototype.


    #include <stdlib.h>
    #include <stdio.h>
    #include <GLUT/glut.h>

    int incrementI(int num, int dir);
  19. Replies
    12
    Views
    38,218

    for (j = 0; j < NUM_ROWS; j++) { for (k = 0;...

    for (j = 0; j < NUM_ROWS; j++)
    {
    for (k = 0; k < NUM_COLS; k++)
    {
    printf("&#37;2c", grid[j][k]);
    }
    printf("\n");
    }
  20. Replies
    8
    Views
    4,624

    You're missing a } at the end of DrawGLScene, if...

    You're missing a } at the end of DrawGLScene, if my eyes do not deceive me.

    Also, you're defining a few variables in the middle of your functions, which is not standard C.
  21. Replies
    6
    Views
    3,512

    For example, you're defining variables in the...

    For example, you're defining variables in the middle of your function.
  22. Replies
    7
    Views
    2,203

    You need to eat up the newline character. Look...

    You need to eat up the newline character. Look above at my code. You'll see how I added a &#37;*c to eat up the newline.

    Also, your brackets and indentation are screwy. Again, look at my code. It...
  23. Replies
    7
    Views
    2,203

    You're reading the values in from a text file,...

    You're reading the values in from a text file, correct? This means that charIn will hold the value of each card once you read that in. Since it's a char data type, you just have to check to see what...
  24. Replies
    4
    Views
    1,227

    Which means you have to pass "type" by reference...

    Which means you have to pass "type" by reference from main() to search_array().
  25. Replies
    7
    Views
    2,203

    I've got a working program that does what you...

    I've got a working program that does what you want, so feel free to ask any more questions you have.
Results 1 to 25 of 133
Page 1 of 6 1 2 3 4