About three lines smaller actually. This version is only 94 lines, instead of the 97 lines of the php version… It confuses me, but eventually I’ll figure it out… I’m sure it has to do with amount of comments or something… Or the fact that it can only take one word…

#include <iostream>
#include <vector>
#include <algorithm>
 
/*
* ========================================================================================
* File: Latinizer.cpp
* Function: Take a one word input and parse the word into their respective pig-latin form
* Author: Coolhand2 (Michael Sherwood)
* Email: coolhand2@gmail.com
* Copyright (c) 2006 by Coolhand2 and ProtoNeo
* Lines of actual code: 41
* ========================================================================================
*/
 
using namespace::std;
 
int main( void )
{
	string phrase; //The phrase itself
	string newPhrase; //Then new phrase (phrase in pig-latin form)
 
	/*
	 * =============================================================
	 * Make lists of the vowels and what punctuation we wanna detect
	 * =============================================================
	 */
 
	vector<char> vowelArray;
	vowelArray.push_back('a');
	vowelArray.push_back('e');
	vowelArray.push_back('i');
	vowelArray.push_back('o');
	vowelArray.push_back('u');
 
	vector<char> delimiterArray;
	delimiterArray.push_back('.');
	delimiterArray.push_back(',');
	delimiterArray.push_back('!');
	delimiterArray.push_back(':');
	delimiterArray.push_back(';');
	delimiterArray.push_back('?');
	delimiterArray.push_back('~');
 
	string endString = "ay";
 
	/*
	 * ====================================================================
	 * Get the word
	 * Some explanation should be done for this part though.
	 * For some reason, the only way to get in a multiple word phrase
	 * is by escaping out the spaces... However since I can't
	 * expect normal users to know how to do that, I won't let it happen...
	 * Bad form, I know... But whatever...
	 * ====================================================================
	 */
 
	printf( "Enter a word to be 'Latinized': " );
	cin>> phrase;
 
	/*
	 * ==============================================
	 * Get the puncuation, and the vowel locations...
	 * ==============================================
	 */
 
	//Punctuation
	int puncPos = phrase.length() - 1; //We have to do this because length assumes base 1 instead of base 0...
	while( find( delimiterArray.begin(), delimiterArray.end(), phrase.at( puncPos ) ) != delimiterArray.end() ) { puncPos--; }
 
	//Vowel
	int k = 0;
	while(  find( vowelArray.begin(), vowelArray.end(), phrase.at( k ) ) == vowelArray.end() ) { k++; }
 
	/*
	 * =============================================================
	 * Initialze the string
	 * Then if needed, contatenate the different parts of the string
	 * onto the new one, then display it.
	 * =============================================================
	 */
 
	if( k != puncPos )
	{
		newPhrase = "";
		newPhrase += phrase.substr( k, ( (puncPos - k) + 1 ) );
		newPhrase += phrase.substr( 0, k );
		newPhrase += endString;
		newPhrase += phrase.substr( puncPos + 1 );
	} else { newPhrase = phrase; }
 
	cout<< newPhrase << endl;
}