thank you
Type: Posts; User: CASHOUT
thank you
for( NODE * p = A.front; p; p = p->next )
To better understand what I'm working on can someone please explain the condition for this for loop?
What's the best C++ book I can buy?
Sorry that was a horrible question.
I wanted to know if there was a way to pass a stack as a parameter to a function rather than having to declare it globally.
I had tried it already and the...
Can you declare a stack globally?
stack< int > stk;
I get what you mean now. Thank you
after removing the extra \ :
string folder = "C:\Users\CASHOUT\Desktop\week8\folder\test1.txt";
Now I'm being told:
Error: incorrectly formed universal character name
The test file for this function is located on my desktop in a folder.
Is the syntax correct when (string folder) is being set to the test file at the file location?
ifstream get_ifs( ) ...
You might want to think about removing those return 0 statements from your if statement blocks.
return 0 should only be used at the end of your program.
You can use break points to achieve...
After applying this optional part to the end of function main()
cout << "\n\nOPTIONAL PART\n";
ld = la;
cout << "\nla contains:\n" << la << '\n';
cout << "\nld contains:\n" << ld...
If the arity of the “+” operator is 2, why is there only one formal parameter in operator+’s function header?
#include <iostream>
#include <string>
using namespace std;
const int SIZE =...
The debugger helped open my eyes to the problem, and in the process became my new best friend.
Thank you.
I have more questions but I'm going to ask my new best friend for the answers first.
I'll keep working with the debugger.
Should my main focus be on debugging push_front()?
Thank you for pointing that out.
void List::push_front( const string &s )
{
// p points to a new node
Node *p = new Node( s, 0, head );
if( head == 0 ) //...
Okay so my first question is why push_front properly pushing "mom" to the front of the list but not pushing "hi" to the frint of the list? instead "hi" is being pushed to the back of the list.
Creating the methods for class List
main.cpp
#include "List.h"
int main( )
{
List la; // create list la
Does this statement make sense in regards to the following program? Be gentle :)
(Derived class employee)’s header takes an argument to (base class person) which gives it access to (base class...
Okay I will. I appreciate your patience.
I see what you mean about coping over the member variables.
I'm still getting an unhandled exception.
Why is money being copied over twice??
#include "List.h"
The program no longer gives an error after deallocation, but the output is still unfavorable.
Rewriting the copy constructor and pop_front produced very little positive results, even though it...
Great my compiler crashed again. I gotta reboot. Why does it keep happening?? gosh
#include "List.h"
/*******************************methods for Node*******************************/
// constructor: init. a Node
Node::Node( const string...
The output seems to be favorable now, but after the destructor deallocates the list and prints the deallocation to the screen an error is recognized.
Unhandled exception
CXX0017: Error: symbol...
Elysia, thank you very much for taking the time to help me understand the logic. I appreciate you.
My attempts at creating a copy constructor in methods.cpp has gotten me; error: function will cause runtime stack overflow (line 47).
#include "List.h"
...