error correction codes

how to write a progam for error correction codes.

that's funny .

where can i find source code for error correction done using c++

commented: No, that's not funny. -1

"error correction code" could mean almost anything. Here is just one example:

std::string name;
while(true)
{
   cout << "Enter your name\n";
   cin >> name;
   if( name != "Jones" )
      cout << "Error\n";
  else
     break;
}

Or do you want to know about try/catch blocks?