啪啪拉拉噼里啪啦

初学者天堂资料汇集

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  16 随笔 :: 73 文章 :: 16 评论 :: 0 Trackbacks

参考文献
 1.C++Primer(第三版) Stanley B.Lippman, Josee Lajoie (中国电力出版社)
 2.C++语言程序设计(第二版) 郑莉 董渊 (清华大学出版社)
 3.C++Primer Plus  Stephen Prata  (人民邮电出版社)
 4.C语言程序设计 谭浩强  清华大学出版社           

C++是从C语言演变过来的,完全可以脱离C而从新学习C++

#include<iostream.h>
void main()
{
  cout<<"welcome to C++ world !!"<<endl;
}

知识点1: *.h 文件被称为头文件.(标准的C++头文件没有后缀) 如iostream.h
            2.*.C 习惯称之为C程序文本文件.(在UNIX系统下则称之为C++文件) C++程序文件的后缀在不同产品中则不同 如 *.CPP  *.CXX...类似的头文件在C++的不同实现中也不相同.
            3.#include 预处理器指示符
            4.#include<> 和#include "   " 区别
               #include<>是标准或者工程文件.  #include" " 表示当前目录下寻找.

#ifdef   bookstore
#define      bookstore
#endif
检查bookstore是否在前面被定义了..
#include<iostream.h>

v1(int x,int y)
{   cout<<"V1"<<endl;
    cout<<"{"<<endl;
 cout<<"x= "<<x<<endl;
 cout<<"y= "<<y<<endl;
 cout<<"}"<<endl;
}

v2(int x,int y)
{   cout<<"V2"<<endl;
    cout<<"{"<<endl;
 cout<<"x= "<<x<<endl;
 cout<<"y= "<<y<<endl;
 cout<<"}"<<endl;
}
void main()
{   int bug;
    #ifdef  bug
 cout<<"welcome to our  C++ world!!"<<endl;
 v1(2,5);
 v2(3,5);
#endif
           

posted on 2005-04-28 12:26 噼里啪啦的世界 阅读(831) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: