original task chapter 5

77 views
Skip to first unread message

chief_1

unread,
Mar 20, 2011, 8:11:58 AM3/20/11
to PPP-public
Hi there, I try to find original task of chapter 5 in sourse but I
dont. Here it is for puporse "Dont write it just copy-paste"!

#include "../../std_lib_facilities.h"

int main()
try {

cout << "Success!\n";
cout << "Success!\n;
cout << "Success"<< !\n"
cout << success << endl;
string res = 7; vector<int> v(10); v[5]=res; cout << "Success!\n";;
vector<int> v(10); v(5) = 7; if(v(5)!=7) cout << "Success!\n";
if(cond) cout << "Success!\n"; else cout << "Fail!\n";
bool c = false; if(c) cout << "Success!\n"; else cout << "Fail!\n";
string s = "ape"; boo c = "fool"<s; if(c) cout<< "Success!\n";
string s = "ape"; if (s=="fool") cout << "Success!\n";
string s = "ape"; if(s == "fool") cout < "Success!\n";;
string s = "ape"; if(s+"fool") cout < "Success!\n";
vector<char> v(5); for (int i = 0; i < v.size(); ++i)
cout << "Success!\n";
vector<char> v(5); for (int i = 0; i <= v.size(); ++i)
cout << "Success!\n";
string s = "Success!\n"; for(int i = 0; i <6; ++i) cout << s[i];
if(true) then cout << "Success!\n"; else cout << "Fail!\n";
int x = 2000; char c = x; if(c== 2000) cout << "Success!\n";
string s = "Success!\n"; for(int i=0; i<10; ++i) cout << s[i];
vector v(5); for(int i = 0; i<= v.size() ;++i) ;
cout << "Success!\n";
int i =0; int j= 9; while(i<10) ++j;
if(j<i) cout << "Success!\n";
int x=2; double d = 5/(x-2); if (d==2*x+0.5) cout << "Success!\n";
string<char> s ="Success!\n"; for (int i = 0; i <=10;
++i) cout << s[i];
int i = 0; while(i<10) ++j; if (j<i) cout <<"Success!\n";
int x = 4; double d = 5/(x-2); if (d==2*x+0.5) cout << "Success!\n";
cin << "Success!\n";




}
catch (exception& e) {
cerr << "error: " << e.what() << '\n';
keep_window_open();
return 1;
}
catch (...) {
cerr << "Oops: unknown exception!\n";
keep_window_open();
return 2;
}


See ya.

Adrian Mowrey

unread,
Mar 20, 2011, 8:29:19 AM3/20/11
to ppp-p...@googlegroups.com
I'm not sure what you mean. You posted the code, but you don't understand what it does, etc.? Can you explain a little more what you need?


--
You received this message because you are subscribed to the Google Groups "PPP-public" group.
To post to this group, send email to ppp-p...@googlegroups.com.
To unsubscribe from this group, send email to ppp-public+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ppp-public?hl=en.




--
Sincerely/Cu sinceritate,

Adrian Mowrey

chief_1

unread,
Mar 20, 2011, 8:41:06 AM3/20/11
to PPP-public
2 Adrian
look at chapter 5 of PPP after 5.11 find out TASK of 25 code lines.
This is original 25 lines from book I writed becouse I cant find
sourse of it, and after writing I posted for people who dont want
write and just want COPY-PASTE for research purposes of PPP study.

Adrian Mowrey

unread,
Mar 20, 2011, 8:50:28 AM3/20/11
to ppp-p...@googlegroups.com

Oh, I see. :-)

Reply all
Reply to author
Forward
0 new messages