Okay, this error is rather annoying, as I can not progress with my program without resolving it.
It is an e-mail checker, and this part is extracting the domains (we previously did it with arrays) using a user-defined template vector class (using char as the type). As of now I'm completely stumped since most of the code was pseudo code from my professor, so I know I'm at least on the right track...
Name = DynamicString::DynamicString();
SubdomainCount = 0;
Buffer is of type T* (so in this case....char*) in the vector class
// Extract subdomains
int nextPosition = Name.IndexOf('.', startPosition);
if ( nextPosition != -1 )
Name.Copy(Name.Buffer, Subdomain.Buffer, startPosition + 1, nextPosition - startPosition);
Subdomain.InsertAt( Subdomain.Size, Subdomain.Buffer );
Name.Copy(Name.Buffer, Tld.Name.Buffer, startPosition + 1, Name.Size);
startPosition = nextPosition + 1;
} while ( startPosition != 0 );
And here is the InsertAt function from the Vector class
The error occurs on the line that is bold, italicized and underlined
void InsertAt(int index, const T& value)
if ( index > Size || index < 0 )
throw "Vector::InserAt() index out of range";
// Exceeding current capacity?
// Make room for the new intacter
// Set the value
Buffer[index] = value;
If you need anything else, just ask me. Thanks!