As I said in my initial post, I do not want to use Wikipedia.
Thanks for the information, it's given me some good stuff to look into.
Type: Posts; User: Beowolf
As I said in my initial post, I do not want to use Wikipedia.
Thanks for the information, it's given me some good stuff to look into.
Hey,
I'm writing a report on Intel's Pentium II (in broad), specifically focusing on what sort of new technology and architecture it brought to the market in 1997 and how it was improved over...
I need to format my output like "%5d\n", where all the output would be integers. Is there anyway to do this using cout?
For example, the output would look like:
14640
6565
Update: I have 3 files - prog6.cpp, sorts.cpp, and sorts.h. sorts.h is:
#include <stdexcept>
void selectSort(int array[], int first, int last) throw (std::range_error);
void bubbleSort(int...
I know this is a real dumb question but my mind completely went blank. In sorts.cpp I have three methods - bubbleSort(int[] array, int first, int last), selectionSort(same), quickSort(same). I...
Ah, thanks. Another logic problem that I am stuck on. I have this code:
cout << "\t[" << *argv[seedIndex] << "]\n";
if(*argv[seedIndex] < 1)
{
cerr << "Invalid Seed...
Also, any idea as to why I am getting this error?
78 Cprog6.cpp [Warning] comparison is always false due to limited range of data type
if(*argv[countIndex] > 32767)
{
cerr <<...
Any idea why when I put OR statements inside the working if statement that it then no longer works?
Well I think I just solved my problem, by changing it to:
if(*argv[typeIndex] != 's')
However, when I try to add to this statement, I get an error, like above when I run the program - even if...
Hey, I am getting a compiler error that I don't agree with (haha). I am attempting to compare chars, but the error the compiler is giving me is:
46 prog6.cpp ISO C++ forbids comparison between...
Hi,
I have a program that takes a seed and generates a random number using srand and rand, however there is another requirement to it that I don't understand and am hoping that you may make sense...
That compiles but it doesn't work (still says ": not found").
Hey, I am trying to check and see if a user-inputed string contains just the newline character (i.e. a blank return). The code I have right now doesn't compile, and I believe that is because it...
I have a program that takes in a line of input, separates it into individual words, and then runs each of those words through a method that replaces illegal characters (like ! and @) with spaces, and...
Ok, thanks. When I was trying it a different way however I came across a compiler error that intrigued me. The error was this:
18 main.cpp ISO C++ forbids comparison between pointer and...
Is there any way to get the total number of words that is in a text file without looping through each line and breaking it down into words and keeping track of that number with a counter variable? ...
So if I wanted to convert every character that is not a letter, ', or a space to a space, the code would be:
string modifyWord(string ss)
{
for(int xx = 0; xx < (int)ss.length(); xx++)...
So something like this?
#include <ctype.h>
char checkVal(char x)
{
if(isalnum(x))
return x;
Hey,
I would like to replace every character in a string that is not a-z A-Z 0-9 or ' with a space. Currently I am trying to approach it this way:
replace(ss.begin(), ss.end(), '!', ' ');
...
Update: apparently the NodePool default constructor is being called and my node .left and .right values are being saved - I added a cerr output at the start of the method to print "NodePool Called"...
Thanks for the help! I have a new question now. When I run my program it unexpectantly ends - "This application has requested the runtime to terminate it in an unusual way". After putting in...
My solution for line 54 worked, yes.
I changed code to:
Node& NodePool::operator[] (int indx)
{
...
}
Ok, here is my thinking. I need myNodePool to be accessible everywhere, just like my bst tree. But i want myNodePool to "inside" of bst, i.e. if I have a var "bst tree" then to access myNodePool it...
Ok, added NodePool myNodePool in bst.h, however now it is telling me:
58 bst.h `NodePool' does not name a type
So inside of bst.h I added #include "node.h", and now it tells me:
21...
Ok, i'm just using a regular object.
bst tree;
Now the error is:
21 bst.cpp `myNodePool' undeclared (first use this function)