c++语言学习
jeffchenbiao
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
int main(int argc,char* argv[]) & fopen & fseek
argc是命令行总的参数个数 argv[]是argc个参数,其中第0个参数是程序的全名,以后的参数命令行后面跟的用户输入的参数,比如: int main(int argc, char* argv[]) { int i; for (i = 0; i cout cin转载 2012-03-26 15:16:39 · 682 阅读 · 0 评论 -
一个晚上和半天把C++primer看到了50页
发现还是没耐心,碰到难得就觉得很吃力。 一些总结 #include//不加.h //using namespace std; //如果要直接使用cin之类的不加std:: ,那么必须加上这句话。 int main () { int sum=0; int value; while(std::cin>>value) sum+=value; std::cout return原创 2012-03-13 16:54:53 · 500 阅读 · 0 评论 -
C++ 的引用
引用(reference)是c++的初学者比较容易迷惑的概念。下面我们比较详细地讨论引用。 一、引用的概念 引用引入了对象的一个同义词。定义引用的表示方法与定义指针相似,只是用&代替了*。 例如: Point pt1(10,10); Point &pt2=pt1; 定义了pt2为pt1的引用。通过这样的定义,pt1和pt2表示同一对象。 需要特别强调的是引用并不产生对象的副本,转载 2012-03-13 18:50:03 · 291 阅读 · 0 评论 -
vector的调试,输出 字符串组
#include #include #include using namespace std; //using std::iostream; //using std::string; //using std::vector; int main() { cout string word; vector jeff; while(1) //也可以直接ctr原创 2012-03-16 16:42:50 · 639 阅读 · 0 评论
分享