摘要: 9.2#include #include #include using namespace std;const int ArSize=10;void strcount(const string &s);void main92(){ string input; string input2; char next; cout>input,然后碰到空格的时候,就直接input=input+" ";但是似乎总会有点问题,最后找到了getline输入格式,发现对输入输出这一块还不是很多透彻,还需继续努力! 阅读全文
posted @ 2014-04-12 23:54 天下纵横C++ 阅读(153) 评论(0) 推荐(0)
摘要: 标准输出函数cout :/*关于浮点数的格式*/#include void main(){ float f=2.0/3.0,f1=0.000000001,f2=-9.9; coutvoid main(){ float f=2.0/3.0,f1=0.000000001,f2=-9.9; cout// 操作元manipulatorcout.setf(ios::fixed);cout.setf(ios::showpoint);cout.precision(2); //用两位小数显示cout// 操作元manipulatorcout.setf(ios::fixed);cout.setf(ios::sh 阅读全文
posted @ 2014-04-12 22:35 天下纵横C++ 阅读(471) 评论(0) 推荐(0)
摘要: 今天下午去了图书馆,然后发现居然从1点玩手机玩到三点,额,好吧,有点小郁闷。这两天效率有点低。发现大学前两年没有好好学习,或许以后可能会后悔吧。但是过去的都已经过去了,把握好当下才是最重要的。你所浪费的今天,都是你死去昨天的所期望的明天。发现自己好像大学学到的东西真心不是很多,这里我指的是技术。以后工作照哪方面的呢?C++工程师,游戏开发,还是游戏安全,或者是往服务器编程方面走呢。还是不要拿自己的短处和别人的长处比。看过一张图片,很有启迪,发上来给大家看看。为何非要贪图快捷走人多的哪一条路呢。慢慢搬砖,总会走到你想到的地方。 阅读全文
posted @ 2014-04-12 21:41 天下纵横C++ 阅读(135) 评论(0) 推荐(0)
摘要: golf.h#ifndef GOLF_H_ #define GOLF_H_const int Len=40;struct golf{ char fullname[Len]; int handicap; };void setgolf(golf &g,const char *name,int hc);int setgolf(golf &g);void handicap(golf &g,int hc);void showgolf(const golf &g);#endifgolf.cpp#include #include "golf.h";#inc 阅读全文
posted @ 2014-04-12 10:41 天下纵横C++ 阅读(117) 评论(0) 推荐(0)