Generate the Norwegian equivalent to social security numbers
Comment on C++ interface:

You are doing work outside of ID that belongs as part of the class:

ID generator;

for(int i = 0; i &lt; DATE_LENGTH; i++){
    *(generator.getDate() + i) = int(dateString[i]-'0');
}

generator.setYear(1900 + (*(generator.getDate() + 4) * 10) + *(generator.getDate() + 5));

while(i &lt; 500){
    generator.individSiffer();
    generator.generate();
    i++;
}


Because this work is not part of a method you are exposing implementation details of your ID class via getter methods. All of which is bad:

A better interface would have been:

std::string date = getDate(); // Get a valid date or throw.
ID          generator(date);

std::cout &lt;&lt; generator;


Comments on Code

Don't use this interface.
What happens if the user types an extra long line of stuff.

cin.getline(dateString, BUFFER);


Its not going to crash but you are left with lots of crap on the input stream. User input is line based so read a line from the user and then try and parse the line. Because a line can be any length don't use that version of get line.

std::string line;
while(std::getline(std::cin, line))
{
    // Valid line has been read.
    if (validDate(line))
    {    return line;
    }
    std::cerr &lt;&lt; "Invalid date please try again\n";
}
throw std::runtime_error("The user give up trying to enter a date correctly");


Comments on C functions

C based functions for printing printf() are dangerous, because they are not type safe. Prefer to use the C++ type safe streams.

Comments on Data values

generator.setYear(1900 + (*(generator.getDate() + 4) * 10) + *(generator.getDate() + 5));


What about people born after 31st Dec 1999?

Comments on Loop structures

while(i &lt; 500){
    // STUFF
    i++;
}

// This kind of loop is better written as a for:

for(int loop=0; loop &lt; 500; ++loop) {
    // STUFF
}


Also notice that I am declaring my loop variable as close to the point of usage as possible. Do not use the C style of putting all the variables at the top of the function. Put your variables where you can see there declaration and type easily.