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)
{...
Type: Posts; User: marQade
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)
{...
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.
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...
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'))
How about this for the insert function?
void CDeck::insert(int index, s_card c)
{
if(empty()||index==1)
{
insertAtHead(c);
}
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...
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...
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++)
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...
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...
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...
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...
I see. I believe you're quite right. Thanks very much!
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...
The display works when using std::left and std::fixed.
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 =...
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...
Problem with that is that I just get spaces across for as long as the getLength() specifies, then the number shows.
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) <<...
OK.
How would you have gone about formatting the numbers for display so they look nice? Such as:
1000
+ 500
--------
1500
Still appreciated.
heh.
Thank you. I appreciate that immensely.
I see that I failed to include #endif, but I when I included it, I still receive error messages identical to the first post.
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...
A guard such as pragma once or ifndef? I will remove the end if and end for.