![]() ![]() I've tried every resource at my disposal and regardless of what I try, the program won't compile. Your program should be able to deal with there being two or more spaces between words.Ĭurrently, I've been able to display each individual sub-string however, I'm unsure how to actually produce the function that does displays the actual translation. Output: oodfellasgay isway othingnay utbay away oodfellasgay nockoffkayĮrror conditions: Your program should get rid of all punctuation and special characters other than letters. Please enter a string to convert to PigLatin: Casino is nothing but a Goodfellas knockoff Void displayPigLatin(const Word wordArr, int size) Write a function that takes in an array of Word structures and outputs the pig latin part of it to the screen, with each word separated by a space. If the word starts with a vowel, simply add “way” to the end of the word To do this conversion, if a word starts with a consonant, the piglatin conversion of the word involves moving the first letter of the word to the end of the string and then adding “ay” to the end. Void convertToPigLatin(Word wordArr, int size) Write a function that takes in an array of Word structures and the size of the array and converts each english field to the corresponding piglatin field. Word * splitSentence(const string words, int &size) Implement the function with the following prototype This function should also remove all capitalization and special characters other than letters. The function should then return this array to the calling function using the return statement, along with the array size using a reference parameter. The function would then store each word of that sentence to the english field of the corresponding structure. It should then allocate a dynamic array of size equal to the number of words. This function should first calculate how many “words” are in the sentence (words being substrings separated by whitespace). Write a function that takes in an English sentence as one string. Note: While there are many ways to do conversions to pig latin, I will require that you follow the procedures below, all of which will use the following structure: Your program will then output this Pig Latin to the screen. The program will then convert it to the code Pig Latin. In this assignment you will be prompting the user to enter an english sentence. This project is for testing the use of structures, arrays and string handling functions. As with most students, I have been tasked with converting a string from English to Piglatin.īelow are the exact requirements of the project (sorry for the length): This is my first time on any kind of programming forum, so please forgive me if I violate any rules.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |