simeesta's Profile User Rating: *****

Reputation: 221 Stalwart
Active Members
Active Posts:
594 (0.24 per day)
04-August 09
Profile Views:
Last Active:
User is offline Dec 23 2015 01:21 PM

Previous Fields

OS Preference:
Favorite Browser:
Favorite Processor:
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:

Latest Visitors

Icon   simeesta is wondering what his status is.

Posts I've Made

  1. In Topic: C: Number system conversion

    Posted 18 Dec 2015

    What have you tried?
    Maybe you should start with a loop.
  2. In Topic: Game of life c++ generations

    Posted 9 Jan 2015

    First of all, why not use a 2d array?
    Second, if you insits on using a 1d array use a function such as
     int getArrayPos(int row, int col);
    which might be clearer than using mapwidth*col+row-1or some other variant.
    Finally what happen when row and col are both 0 in:
    if(SpielfeldOldGen[mapwidth*col+row-1]        == '0'){alive+=1;}

    Just something to start you off with (think about the boundary cases).
  3. In Topic: What is making this an abstract class?

    Posted 1 Aug 2014

    At a guess I'd say it would be lines 14-17 in your manager class. This says is has 3 pure virtual functions. It shouldn't as you given implementations later on.

    I think you need to understand the difference between a virtual function and a pure virtual function. Have a look at this.
  4. In Topic: Bitwise operations - float distance in C

    Posted 22 Jul 2014


    My process was to extract the mantissa and exponent, increment the mantissa, increment the exponent if it overflows, reconstruct the value and subtract the distance between them.

    Why not have extractMantissa(int), extractExponent(int) and getNextFloat(int) functions. Then you can test them.

    This might be helpful.

    Why are you initializing your mantissa and exponent to 0xff?

    unsigned int exponent = 0xff;
       for (int i = 24; i < 31; i++) {
                       if (((1 << i) & floatbits) != 0) exponent = exponent | 1 << i;

    should probably be
    //this moves the bits to the far right.
    if (((1 << i) & floatbits) != 0) exponent = exponent | 1 << i - 24;

    I see that you increment the exponent. In your case the exponent will look like
    0xxxxxxxx00...00 then when you increment it, it will look like 0xxxxxxxx00...01 where xxx are the exponent bits. You will also have to take this into account when constructing the bit pattern.

    What is floatbits?

    if (mantissa != mantissa) exponent++; // if it overflows, increment the exponent too.

    This does not check for overflow. mantissa != mantissa will always be false. To check if there was overflow you could check after the addition if bit 23 is 1 or not. Hint use (0x1 << 23).

    It's much easier to get bits using masks rather than loops eg.
    int mantissa = bitnumber & 0x7fffff;
    int exponent = (bitnumber & (0xff << 23)) >> 23;
  5. In Topic: Basic Structure

    Posted 2 Jul 2014

    // This is a preprocessor directive. It allows functions defined in iostream.h to be used
    using namespace std;
    // C++ has something called namepsaces. This says to use the namespace called std.
    int main() {
    //this is the starting point of any C++ program. Every C++ program has a function called main()
      cout << "Hello World!" << endl;
      return 0;

    More info:


    To learn C++, I suggest to start tutorials online such as this, instead of asking for "some more basic stuff".

My Information

Member Title:
Deadly Ninja
24 years old
September 29, 1991
Computers, Maths, Karate, Films, Games.
Full Name:
Years Programming:
Programming Languages:
C/C++, Haskell, Java, X86/X86-64 assembler, prolog, MATLAB.

Contact Information

Click here to e-mail me
Website URL:
Website URL  http://


Page 1 of 1
  1. Photo

    David W Icon

    07 Jun 2012 - 01:52
    Whow ... you may like to see/use some of the C help files like
    and their help function files
    at ...,2580.0.html
    and ...,2582.0.html
Page 1 of 1