OK, so I just added #include <algorithm> and I am still getting this error message....
Type: Posts; User: tms43
OK, so I just added #include <algorithm> and I am still getting this error message....
I've got this code 'snippet' that is giving me problems. Isn't max(val, 255) part of the <iostream> library? I get an error when I use it like this:
val=max(min(val,0),255);
Says...
Thank you :)
I have this code, and I need to understand it better. I'm hoping one of you will explain, ESPECIALLY the part using the double pointer:
typedef strudt{ // I get this part, I include it...
tyvm
ok, then how do I access the structs? Is it customary to put the structs in a different file or above main?
what would be the most likely equivilence for a struct? C programmers LOVE structs, but as a noob C++ programmer, I'm not well versed with them.
EX:
typedef struct{
float x, y;
float...
nice touch! It's always good to shorten code AND make it more readible. Thanks again!
by george I think you saved the day! I was on the same track, but missed the ipWireJ... GREAT catch.
Thank you very much :)
yes, I tried initializing all of them using the constructor without parameters. So, I'm thinking that what I've done will never get me to what I need it to do. (*gasp*) This should be so easy. I...
It puts out garbage. I need to initialize my variables, probably in my default constructor. But I've tried it several ways and it hasn't worked. Like for instance:
ipJ = 0;
does not change...
I'm writing a program that is supposed to simulate a JK flip flop. Thing is it's been a while since I've written in C+ and I can't figure out how to initialize my variables (*embarrassed*).
Here...
the last character would move to the first, the first character would move to the right. So it seems that it would only effect the code word made, making the code word longer, right?
So nobody can help me with this?
The question from my homework is this:
In the adaptive Huffman algorithm, first the codeword for an encountered symbol is issued and then the conversion table is updated. Could the table be...
yeah, its the pointer thing that confuses me as well as the interaction with the binary tree. I'm sure it seems obvious, but everything I've done (by instinct) has been wrong. I am simply stuck. ...
The final function (method) needed to make my Address Book complete is a modify function. One that modifies the data in the address book. Right now I've done a rather 'sloppy' version, by deleting...
Thank you thank you thank you!
Now I'm having troubles with writing the file out. I'M SO CLOSE to finishing this assignment!
OK, here is my call to the function:
case 5: cout << "Enter the name of the File to save...
You've helped me before. Once again you've saved the day! Thank you! That is what was needed.
tms
In my test program (main) I am asking the user to give me a filename in case 2:
#include <iostream>
#include <string>
#include "Tree.h" // Tree class definition
#include "AddressBook.h"
...
DOH!
thanks
Its this test code:
#include "Tree.h" // Tree class definition
int main()
{
Tree< string > stringTree; // create Tree of int values
string stringValue;
well, its still doing the same thing. It says that the item doesn't exist, and nothing gets deleted. So, I'm working on other parts of this applicaiton. I know there is something simple missing,...
ok, I did that. Still doesn't work. Here is the changes:
template< typename NODETYPE >
void Tree< NODETYPE >::deleteFromTree(TreeNode<NODETYPE>* &ptr)
{
TreeNode <NODETYPE> *current; ...