Search:

Type: Posts; User: marQade

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. I have a new unhandled exception, and I think...

    I have a new unhandled exception, and I think it's coming from my insert function which is defined as follows:


    void CDeck::insert(int index, s_card c)
    {
    if(empty()||index==1)
    {...
  2. Oh. I've been staring at this for so long I've...

    Oh.
    I've been staring at this for so long I've stopped recognizing error messages. I initialized cvalue to 0.
    I'm sure I'll be back on in a few minutes.
  3. Replies
    22
    Views
    2,714

    It's just letting you know there may be...

    It's just letting you know there may be extraneous code. That error doesn't stop it from running, but if you want to get rid of it you should return a dummy value. Say under case 1, if the blah...
  4. I made some changes to my takeTurn(), and get the...

    I made some changes to my takeTurn(), and get the same runtime error message.


    int CDeck::takeTurn()
    {
    s_card c;
    int cvalue;
    char choice = 'H';

    while(toupper(choice=='H'))
  5. How about this for the insert function? ...

    How about this for the insert function?



    void CDeck::insert(int index, s_card c)
    {
    if(empty()||index==1)
    {
    insertAtHead(c);
    }
  6. I know, I know...but I really need to learn all...

    I know, I know...but I really need to learn all about LL's.
    I did start out defining a separate card class, but was hampered by my lack of knowledge on how to relate the classes w/o using public...
  7. I have done this in the constructor ...

    I have done this in the constructor


    CDeck::CDeck:head(0)

    I have a function written for insert at head, which assigns new nodes, which I forgot to use in my buildDeck. That will probably work...
  8. Unhandled exception caused by LL build deck

    Unhandled exception has a problem with my buildDeck function below


    void CDeck::buildDeck()
    {
    cardNodeptr cur = head;

    for(int x=1; x<=4; x++)
    {
    for(int y=1; y<=13; y++)
  9. I have had so much trouble with LL that I need to...

    I have had so much trouble with LL that I need to learn this once and for all from scratch.
    I removed the public class inheritance, and moved the cardNodeptr to CDeck. I changed the return type on...
  10. Shuffling Cards Using Old-Fashioned Linked Lists

    Thanks for that! Okay, so I cleaned it all up. Actually I scrapped it and started over from stubs. Now I am attempting to shuffle a deck of cards, and have an issue. Code first, explanation of...
  11. Okay, so I've made some changes. Now VS is...

    Okay, so I've made some changes. Now VS is giving me errors about 'head undeclared identifier' - which I can see because I defined it in the card class header file and used it in the deck class...
  12. Linked Lists error: m_deck undeclared identifier

    My compiler's throwing a fit because m_deck is an undeclared identifier. But I think I DID declare it: Please tell me what you think from the following snippets:

    I have declared card data...
  13. Replies
    2
    Views
    1,346

    I see. I believe you're quite right. Thanks very...

    I see. I believe you're quite right. Thanks very much!
  14. Replies
    2
    Views
    1,346

    Define data structure

    Hi...I need some syntax help with my game! I'm still putting together the declaration files, and I'm using a provided ADT header file, such as follows:


    const int MAX_LIST = 52;
    typedef...
  15. Replies
    2
    Views
    2,164

    The display works when using std::left and...

    The display works when using std::left and std::fixed.
  16. Replies
    2
    Views
    2,164

    Alright...I've figured out part of my own...

    Alright...I've figured out part of my own problem...putting it here so anybody else who was curious can find out.
    To solve the issue of one item repeating itself on the list, the line


    fromCur =...
  17. Replies
    2
    Views
    2,164

    Linked Lists and an Inventory Program

    Hi...
    I am trying to write code to process a return order and a purchase order for an inventory program. However, I get some strange output! I'm not very familiar with linked lists, but basically...
  18. Thread: Documentation

    by marQade
    Replies
    15
    Views
    1,902

    Problem with that is that I just get spaces...

    Problem with that is that I just get spaces across for as long as the getLength() specifies, then the number shows.
  19. Thread: Documentation

    by marQade
    Replies
    15
    Views
    1,902

    I was using the iomanip library and trying to...

    I was using the iomanip library and trying to force setw() and setfill() in main(). I didn't, however, include the object name, such as:


    cout << Centipede.setw(Centipede.getLength()+2) <<...
  20. Thread: Documentation

    by marQade
    Replies
    15
    Views
    1,902

    OK. How would you have gone about formatting the...

    OK.
    How would you have gone about formatting the numbers for display so they look nice? Such as:
    1000
    + 500
    --------
    1500
  21. Thread: Documentation

    by marQade
    Replies
    15
    Views
    1,902

    Still appreciated.

    Still appreciated.
  22. Thread: Documentation

    by marQade
    Replies
    15
    Views
    1,902

    heh. Thank you. I appreciate that immensely.

    heh.

    Thank you. I appreciate that immensely.
  23. Thread: Documentation

    by marQade
    Replies
    15
    Views
    1,902

    I see that I failed to include #endif, but I...

    I see that I failed to include #endif, but I when I included it, I still receive error messages identical to the first post.
  24. Thread: Documentation

    by marQade
    Replies
    15
    Views
    1,902

    I inserted this into the top of my header file...

    I inserted this into the top of my header file and my implementation file:


    #ifndef FATINTEGERS_H
    #define FATINTEGERS_H


    and I have a mismatching ifndef error message. How am I doing this...
  25. Thread: Documentation

    by marQade
    Replies
    15
    Views
    1,902

    A guard such as pragma once or ifndef? I will...

    A guard such as pragma once or ifndef? I will remove the end if and end for.
Results 1 to 25 of 56
Page 1 of 3 1 2 3