Programming

Programming

Download and install the appropriate C++ development software based on your operating system as specified in the announcements and Instructor Guidance.ÿÿDepending on your operating system, you may need to download and run alternate software. XP usersÿmay need the following patch to get the softwareÿto run:ÿ. Windows Vista and Windows 7 users are advised to download a similar opensource C++ program: , instead of the software provided with the text.ÿ. Students using Visual Studio need to copy the zip file that provides the C++ libraries: . Pleaseÿread theseÿÿon downloadingÿthe zip files to your hard drive.ÿÿAs part of this exercise you will also use the sample code below to test the application, compile the code andÿcommunicate that your application was installed and working.ÿThis is the sample code:ÿ#include #include namespace std;ÿ main() { ÿ string str1(“”); ÿ string str2(“”); ÿ string str3(“”); ÿ string str4;ÿÿ ÿ str4 = str1; ÿ cout << str1 << << str3 << ;ÿÿ ÿ str4 = str1 + str2; ÿ cout << str4 << ;ÿÿ ÿ str4 = str1 + + str3; ÿ cout << str4 << ;ÿÿ ÿ if(str3 > str1) cout << ; ÿ if(str3 == str1+str2) ÿÿÿ cout << ;ÿÿÿ str1 = ; ÿ cout << str1;ÿÿ ÿ string str5(str1); ÿ cout << str5;ÿÿ ÿ cout << ; ÿ cin >> str5; ÿ cout << str5;ÿsystem("pause"); ; ÿ }ÿThe code above is a simple program that will output some string statements and then ask for one input and close after you enter text and then hit enter.Try to change the text once you are successful and rename your source file. Play around with the strings. Report your experience and your efforts to the discussion board.


Comments are closed.