
c++ primer plus
amtfddd
这个作者很懒,什么都没留下…
展开
-
c++ primer plus 习题5.7(使用new为结构创建动态数组)
#include using namespace std; struct car{ string brand; int year; }; int main(){ int num,i; cout cin>>num; car *pz= new car[num] ; for(i=1;i cout cout cin>>pz[i-1].brand; cout cin>>pz[原创 2015-01-14 13:24:25 · 416 阅读 · 0 评论 -
c++ primer plus 习题6.3(switch)
#include using namespace std; int main(){ cout<<"please enter one of the following choices:\n"; cout<<"c) carrnivore"<<"\t"<<"p) pinist\n"; cout<<"t) tree"<<"\t"<<"g) game\n"; char choice; cin>>c原创 2015-01-15 21:47:16 · 386 阅读 · 0 评论 -
c++ primer plus 习题6.1 (cctype,cin.get)
#include #include using namespace std; int main() { char ch,change; cout<<"please input:"; cin.get(ch); while(ch != '@'){ if(!isdigit(ch)){ if(isupper(ch)) { change=ch+32; cout<<c原创 2015-01-15 20:11:04 · 288 阅读 · 0 评论