I think I will go with the indicator, thank you
Type: Posts; User: quizkiwi
I think I will go with the indicator, thank you
So I want to create a tree with two different types of nodes, the internal nodes have pointers to further nodes, while the leaf nodes simply have elements. In Pascal, you can define a type with one...
I fixed this by implementing what the Unix Man pages states never to do and that is use low-order bits...
random_integer = 1 + (rand()%50)
This gives a random number between 1 and 50. Since...
Well, I understand what you are saying, and I did some tests to confirm it, but is there a solution to having a random number within a certain range? And why does this work perfectly on XP with...
I did check on that and RAND_MAX is the same, in fact, this formula is specified in the Unix Man pages.
Does anyone know why this compiles but does not work on a Unix platform using g++? It works fine on a windows box using vs2005. It seems the random number is always 0. Thanks for your help!
...
Thank You for the reply.
Basically the way it is set up now, the box does not actually compute times as far as i can tell (i did not design it) I believe, it simply has the first seat to create...
Hey Guys,
I am fairly new at this, so I am going to put some stuff out there and see if anyone can lead me in the right direction.
Right now I have a "quiz box" which interfaces with three sets...
I have a bunch of browser warnings and I am not sure if I should ignore them or if they actually are warning about improper logic, take a look...
vector <int> tlist;
for(int i = 0; i <...
I believe your problem is that you cannot use 'small' as a variable name. Try small1 or smalll or something else. The other problem that I see is that after verifying that the sum is bad, it just...
isn't that cute...thank you very much
Okay, so my homework assignment states, "use the for_each algorithm to print out the contents of a vector of doubles using the display function." Here is what i have, but how do i get it to send a...
or in simpler terms...
This...
cout << "1. Addition"; <<endl;
Becomes...
i have successfully accomplished what i wanted with a combination of my original code and also ILoveVectors example. The program removes punctuation and lowers everything to lowercase. This is the...
Here is something to try...not sure if it works exactly, i am not at my compiler.
#include<iostream>
#include<string>
using namespace std;
int main ()
{
string intput; //declares...
Oh i see... you used my original code and it worked?
As far as syntax, I was able to get that to work the way i wanted it to with text i typed in. The problem came up with this particular text...
make sure to look closely though...it does not remove the hyphens as it should
Thanks for your help. This compiles fine without runtime errors, however, it simply ignores the characters giving trouble to isalpha(), namely the hyphen.
I am going to attach a portion of the...
I am trying to read in from a file, remove numbers, and hyphens so that the output of this...
would be...
I believe this code works the way I expect it too...however, i copied a large...
This may be a silly question, but here goes. Is there any way I can pass cout as a parameter(by reference of course) into a function that takes an ofstream& as opposed to an ostream&? Basically I...
thanks everyone, removing the const worked. I am not using a friend decleration because this is for a class and i must demonstrate that i understand what the teacher taught :). sorry codeplug for...
That would be the case if I wasn't making the input() function a member method and just passing the istream to the overloaded function. Thanks for looking
I am trying to overload an the >> operator for my new Money class. It compiles fine, however when it gets to the point where i use the operator it, seems to loop the input method for a while and...
thanks, i could not figure out how to assign that vector in the main.
How do i call that function so that i can use the vector in main?
thanks!
vector<string> function();
int main()
{
//what goes here?