Search:

Type: Posts; User: michael-

Search: Search took 0.00 seconds.

  1. Thanks Quzah. That really really helps. I rewrote...

    Thanks Quzah. That really really helps. I rewrote my insert_database function, implementing what you suggested. Here's what I ended up with:
    void insert_database( struct Database * db, struct...
  2. Hi, I know this is late, but it's on this same...

    Hi,
    I know this is late, but it's on this same topic. Your assistance so far has been really great.
    I'm stuck on validating the "location-to-insert" in the list. Here's what I have:...
  3. Some of the code provided by my teacher makes me...

    Some of the code provided by my teacher makes me doubt what I'm doing (not that I was ever sure):
    for( i = 0; i < db->ncountries; i++ )
    {
    delete_country( db->list+i ); // free mem alloc to a...
  4. Well, that's where I'm stuck. I dynamically...

    Well, that's where I'm stuck. I dynamically allocate (with calloc) the space needed for my array of country structures:
    db->list = (struct Country *)calloc( countries, sizeof( struct Country )...
  5. I don't get one. It inserts one country at index...

    I don't get one. It inserts one country at index 2, and then it stops (I have 4 countries to be inserted).
  6. Struct with a ptr to a dynamically allocated array of other structures :(

    I can't really make that description any simpler. I need help accessing a certain element of a dynamically allocated array of structures, and my only access to the array is a pointer contained in...
  7. Replies
    1
    Views
    1,098

    Simple int -> char conversion failing...

    Hi,
    I'm trying to convert an int to a char, just to see if the value entered is a alphabetic character. Here's what I have in my method:
    void FillUserArray( int userArray[], int arraySize )
    {
    ...
  8. Replies
    3
    Views
    19,982

    I did check out the sorting tutorials on...

    I did check out the sorting tutorials on cprogramming.com, but I found them to be very unhelpful (my comprehension level is below that of someone who will make it in the programming world, but I'ma...
  9. Replies
    3
    Views
    19,982

    Sorting in descending order

    I've got an assignment that requires me to use selection sort in descending order, and here's my code so far:
    void SortRecord( float grades[] )
    {
    int i, j;
    int min, temp;

    for( i =...
  10. Replies
    18
    Views
    4,932

    Thanks spydoor, that was the formatting I needed....

    Thanks spydoor, that was the formatting I needed. And thanks to everyone else who added their input. I learned more with this one than any of the other labs. :)
  11. Replies
    18
    Views
    4,932

    spydoor, I agree with you entirely. The way the...

    spydoor, I agree with you entirely. The way the input file was given to me, with all these jumbled up spaces and with a poor description, was confusing at best.

    What you provided is a great...
  12. Replies
    18
    Views
    4,932

    That'd be going against the rule of the lab, and...

    That'd be going against the rule of the lab, and in either case, I still don't know how to read a space versus an entire float (switching between %c or %f).
  13. Replies
    18
    Views
    4,932

    One final question, and it's to do with...

    One final question, and it's to do with formatting this input file into an output file. Here's the code so far:
    /************************
    * CIS 15AG AM - Lab VII
    *
    * A program to help a...
  14. Replies
    18
    Views
    4,932

    Thank you all so much. That's really helpful. I'm...

    Thank you all so much. That's really helpful. I'm sure I'll be back with more questions (and I think I know why - after rereading the assignment, it's written very poorly, but my professor is a CIS...
  15. Replies
    18
    Views
    4,932

    Hrm. I've been battling this one again for a...

    Hrm. I've been battling this one again for a while. I dont understand why I'm so baffled by this, but I need support again. Here's what I have so far:
    /************************
    * CIS 15AG AM -...
  16. Replies
    18
    Views
    4,932

    I see. So fscanf( ... ) doesn't go back to the...

    I see. So fscanf( ... ) doesn't go back to the start of the line if the call to the function ends? That's helpful info. Thanks, I'll get back to giving it a shot :)
  17. Replies
    18
    Views
    4,932

    Unfortunately, I'm not allowed to use arrays at...

    Unfortunately, I'm not allowed to use arrays at all :/

    Would your suggestion be like this (I apologize for not testing first, but I dont have an IDE at hand here):
    fscanf( input,...
  18. Replies
    18
    Views
    4,932

    Trouble with a lab

    Hi :)

    I've been perusing the board here for a couple weeks, and have found it to be a great resource in learning C and C#. However, I can't find any answer to my current problem, which is part of...
Results 1 to 18 of 18