~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

professor -> WaltP

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

LONG-caped superheros are running on cracked rooftops, placidly.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

close to impossible.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

thoughts and choked

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

cpu -> processor

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

"Man you sure know how to avoid a word.."

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

from you is

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

White-caped superheros are RUNNING on lush rooftops, placidly.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

forget the nightmare

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

gear -> cycle

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Preferred choices depend on the individuals exercising them.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You need to put single quotes around 0 and 9 for them to be treated as characters...

bool Characters_Allowed_Matrix(char a)
{
    bool b;
    if ((a == ' ') || (a >= '0' && a <= '9') || (a == ';'))
    {
        b = true;
        return b;
    }
    else
    {
        b = false;
        return b;
    }
}
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Enough of all this, I guess I will have to be more strict.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

come up with

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

To be honest, I'm really confused why you guys are making a fuss about us having a whole new color scheme. The ONLY color change at all was the listing of forum threads. :)

After the entire day's work, we need to do something. This is something, so we must do this....

Btw, you ask for suggestions, we give them, then you say we make a fuss...strange.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

So better think

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

A very simple algorithm for your needs:

• Declare variables to hold the prime limit (the number till you want the prime numbers to be generated) and a flag which indicates whether a prime number was found or not (a boolean variable).

• Since while checking for primes we normally say that if a number is divisible by only 2 and itself then its a prime number. We can use a short cut here by considering that if a number is not divisible by any number between 2 and its square root, its a prime number.

• To achieve the above task, we would be needing two loops, one to generate all the numbers and the other for testing the numbers.

• Run the outer loop from 2 to the LIMIT and let the control variable (loop variable) be i.

• Run an inner loop with control variable j, where j starts from 2 and the loop runs till the square of i is less than or equal to j (short cut method)

• Inside the nested loops test whether i is completely divisible by j ( i % j = 0 ) .

• If the above condition is true, then we can conclude that the number is not prime. In this case, set the prime found flag to false and break out of the inner loop.

• After breaking out of the loop test whether we ducked out of the …

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Some points:

• You are missing two closing braces at the end of the program.

• In your class definition remove the class names before the functions since they are only needed when you provide function body to your functions outside the class.

GridActive& GridActive::operator= (const GridActive & grid);
// more code
void GridActive::setActive (int x, int y, int z);

• You need to provide a while statement after the third closing brace to make your do while statement work properly.

• Next time you undertake a project, do remember to text your code incrementally and not try to do in one go...

Here is updated running (correctly?) code devoid of errors (but not tested) :

#include <iostream> //For console output
#include <windows.h> // WinApi header
#include <conio.h>
using namespace std;

#define EMPTY_CELL 177
#define CURSOR 1
#define TAIL 219
#define NUM 6

class Room
{
private:

public:
    bool visited;
    bool active;
    Room(); // Default Constructor
    Room(bool visited, bool active); // Overloaded Constructor
    Room(const Room &node); // Copy Constructor
    Room& operator= (const Room& node); // Operator
    ~Room(); // Destructor/Destroyer
    //Mutators
    void setActive (); // Gets the console ready to draw the minesweeper grid
    char draw (); // Draws the grid for minesweeper
};
Room::Room()
{
    bool visited = NULL;
    bool active = NULL;
}

Room::Room(bool v, bool a)
{
    visited = v;
    active = a;
}

Room::Room (const Room &node)
{
    bool visited = node.visited;
    bool active = node.active;
}

Room& Room::operator=(const Room& node) …
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

drenched in sweat

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You get to play the brand new WoW - The Burning Crusade.

I put in some dog hair.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

oil -> rig

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

White-caped SUPER-HEROES are prancing on lush tables, placidly.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

with the obnoxious

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Album of photos brings back the hauting memories.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

The code which you have posted looks good. How have you declared WORDP1 ? If possible post the relevant code snippet ?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

What warning do you get ? Paste the exact warning and the line number of warning...

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Did you declare p as an unsigned char? The conversion won't work very good. Declare 'p' as a regular char, and all should go well.

I guess you wanted to say "p should be a char pointer" since strchr returns a character pointer to the first occurance of the character in the string if it was found otherwise a NULL...

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Agreed with ~S.O.S.~

Heh, you really missed the sarcasm in my post.....:confused:

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Huh ? Can't you see a small rectangle in the middle of the screen where you can play pac-man and many other games ?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

There is acutally a typo in your program -- in your second loop while displaying, you have wrongly used and incremented the variable "i" when it should have been j. The result being that "j" never gets changed and results in an infinite loop.

Some tips:
• Avoid forward declaring the loop control variables since its better if you declare and initialize the loop control variable in the loop itself.

for( int i = 0; i < SIZE; ++i ) { // code }

• Your floating casting which happens in the second display loop is superfluous since it has no effect -- the values are in the end rounded off to integers. Better come up with a integer scaling factor which would greatly simplify the problem rather than coming up with cryptic calculations.

• Avoid delaring variables in loops. Though modern compilers have become really smart and perform a lot of optimizations, its better not to test its patience and write good code. Peform varaiable declarations just before the point of using them.

Something like:

for(int i = 0; i <26; i++)
{
      length = count[i] ;
      cout << static_cast<char>('a' + i) << ":  " ;
      for (int j = 0; j < length; j++)
      {
          cout << "* " ;
      }
      putchar( '\n' ) ;
}
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

choir -> church

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

From the poll 90% of the people who have voted think that Valentine day sucks big time....

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

White-skinned pandas are PRANCING on lush tables, placidly.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

someon else without

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

snowflake -> unique

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Womb is from where we all are born.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

which was decorated

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You can see how I feel as if no matter what I do, I am still going to get praise from some and criticism from others ... so all I can do is listen to everything I hear and do what I personally feel is best.

You really can't please anyone. Getting everyone to agree to a single point is as such an ideal situation. Do what you feel best as you have always done.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

How about a 'most rep from newbies' competition. This way you'll have to post relevant posts to score points. Just a thought.

...but would be difficult to keep track of. I guess that means adding a new column to the member table.

Most number of helpful posts (decided by the admins of course) or most number of posts would be a good thing.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

By the way, how did you get the color in the code you posted?

By manually coloring it...

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Holy thread necromancy, Batman!

Aww, you are just killing the RPG spirit...

Holy thread Necromancy, Diablo !!! :cheesy:

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Post your attempt and maybe then we would be able to help you out...

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Append the statement using namespace std; after the inclusion of the headers and you should be fine. This is because the C++ implementation wraps all the standard functions in a namespace std, so you have to make the compiler aware of that by using the "using namespace std;" statement.

Also if you are using new style of header inclusion, stick to it and don't mix the two techniques.

Also you positioning of braces is incorrect -- you have got them all skewed, you need to use the opening braces for writing function definations and not before them.

Do something like:

#include <iostream>
#include <cmath>
#include <cstring>
#include <iomanip>
using namespace std ;

int main( void )
{
   // code
}
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Agreed with Joey, can't even get to type my responses properly there. Making technical posts which include pasting snippets would force me to switch to the advanced reply view. The previous one was good to go....

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

As always, in these circumstances go for the solution that works every time. Sure you can build functionality in eof() so that it works correctly.

Hell you can even use gets() safely if you go outta your way to implement the requisite error checks.

But that's extra work for very little benefit.

The code snippet / my post was meant to illustrate that using eof( ) is not completely wrong or taboo if used the right way. Just ignoring a part of language just because using it in the wrong way ensues chaos is foolishness.

An use of eof( ) would be:

char buf[BUFSIZE];
 do {
   in.read( buf, BUFSIZE );
   std::streamsize n = in.gcount();
   out.write( buf, n );
 } while( in.good() );
 if( in.bad() || !in.eof() ) {
   // fatal error occurred
 }
 in.close();

Not bad, is it...

So stop considering a feature bad just because someone says so...

See you don't learn this at the google groups.

I guess you were badly flamed at google groups for obvious reasons, thats why you keep mentioning it.....

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

White-SKINNED pandas are dining on lush bamboos, greedily.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Ladybirds are not the same as beetles.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

place and we

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

werk -> work

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Yes, that surely