![]() ![]() target file.txt Contents of 2įriends, Romans, countrymen, lend me your ears, I come to bury Brutus not to praise him. Bear with me My heart is in the coffin there with Caesar And I must pause till it come back to me. You all did love him once, not without cause: What cause withholds you then, to mourn for him? O judgment thou art fled to brutish beasts, And men have lost their reason. I speak not to disprove what Brutus spoke, But here I am to speak what I do know. You all did see that on the Lupercal I thrice presented him a kingly crown, Which he did thrice refuse: was this ambition? Yet Brutus says he was ambitious And, sure, he is an honorable man. He hath brought many captives home to Rome Whose ransoms did the general coffers fill: Did this in Caesar seem ambitious? When that the poor have cried, Caesar hath wept: Ambition should be made of sterner stuff: Yet Brutus says he was ambitious, And Brutus is an honorable man. He was my friend, faithful and just to me: But Brutus says he was ambitious And Brutus is an honorable man. Here, under leave of Brutus and the rest For Brutus is an honorable man So are they all, all honorable men- Come I to speak in Caesar's funeral. The noble Brutus Hath told you Caesar was ambitious: If it were so, it was a grievous fault, And grievously hath Caesar answer'd it. The evil that men do lives after them The good is oft interred with their bones So, let it be with Caesar. Expected operation : source file.txt Contents Friends, Romans, countrymen, lend me your ears, I come to bury Caesar, not to praise him. For example, if your user ID is A999B999 name your file as File Handling_A999B999.cpp. For this part of the assignment, name your source file as FileHandling_WSUID.cpp. Please properly comment your code before submission. Upon successful execution all occurrences of Caesar become Brutus and Brutus becomes Caesar You can use functions from the cstring library. You will need to load the file "source_file.txt" and finally write the updated contents with the replaced words to the file "target_file.txt”. Question 1 of 1: File Handling: Write a C++ program that will swap the words Caesar and Brutus in the file "source_file.txt”. My heart is in the coffin there with Caesar ,Īnd I must pause till it come back to me. O judgment! thou art fled to brutish beasts,Īnd men have lost their reason. What cause withholds you then, to mourn for him? You all did love him once, not without cause: I speak not to disprove what Brutus spoke, Which he did thrice refuse: was this ambition? When that the poor have cried, Caesar hath wept:Īmbition should be made of sterner stuff: ![]() Whose ransoms did the general coffers fill: He hath brought many captives home to Rome He was my friend, faithful and just to me: Here, under leave of Brutus and the rest– The noble BrutusĪnd grievously hath Caesar answer’d it. The good is oft interred with their bones I come to bury Caesar, not to praise him. Text: Friends, Romans, countrymen, lend me your ears ![]()
0 Comments
Leave a Reply. |