CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
不看会后悔的Windows XP之经验谈 简单快捷DIY实用家庭影院
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  C/C++ >  C++ 语言

c++???

楼主bingchuan(zy)2004-04-03 00:31:50 在 C/C++ / C++ 语言 提问

我以前听说先学C语言才能学c++,所以我一直没学c++,C++的最大做用是什么呀? 问题点数:0、回复次数:10Top

1 楼jp1984(mathfrog)回复于 2004-04-03 00:34:12 得分 0

没有最大的作用。   。C和C+都是做底层工作的。。   比如嵌入式开发什么的。。   C++向下兼容C,所以你完全可以直接跳过C而直接学C++,   可以说这两者没有直接的联系。。不过有C的基础可能会更好理解C++中的概念。。Top

2 楼angelo23(angelo)回复于 2004-04-03 00:41:34 得分 0

1.5   Use   of   C++  
  C++   is   used   by   hundreds   of   thousands   of   programmers   in   essentially   every   application   domain.  
  This   use   is   supported   by   about   a   dozen   independent   implementations,   hundreds   of   libraries,   hundreds  
  of   textbooks,   several   technical   journals,   many   conferences,   and   innumerable   consultants.  
  Training   and   education   at   a   variety   of   levels   are   widely   available.  
  Early   applications   tended   to   have   a   strong   systems   programming   flavor.   For   example,   several  
  major   operating   systems   have   been   written   in   C++   [Campbell,1987]   [Rozier,1988]   [Hamilton,1993]  
  [Berg,1995]   [Parrington,1995]   and   many   more   have   key   parts   done   in   C++.   I   considered   uncompromising  
  low-level   efficiency   essential   for   C++.   This   allows   us   to   use   C++   to   write   device   drivers  
  and   other   software   that   rely   on   direct   manipulation   of   hardware   under   real-time   constraints.   In   such  
  code,   predictability   of   performance   is   at   least   as   important   as   raw   speed.   Often,   so   is   compactness  
  of   the   resulting   system.   C++   was   designed   so   that   every   language   feature   is   usable   in   code   under  
  severe   time   and   space   constraints   [Stroustrup,1994,§4.5].  
  Most   applications   have   sections   of   code   that   are   critical   for   acceptable   performance.   However,  
  the   largest   amount   of   code   is   not   in   such   sections.   For   most   code,   maintainability,   ease   of   extension,  
  and   ease   of   testing   is   key.   C++’s   support   for   these   concerns   has   led   to   its   widespread   use  
  where   reliability   is   a   must   and   in   areas   where   requirements   change   significantly   over   time.   Examples  
  are   banking,   trading,   insurance,   telecommunications,   and   military   applications.   For   years,   the  
  central   control   of   the   U.S.   long-distance   telephone   system   has   relied   on   C++   and   every   800   call  
  (that   is,   a   call   paid   for   by   the   called   party)   has   been   routed   by   a   C++   program   [Kamath,1993].  
  Many   such   applications   are   large   and   long-lived.   As   a   result,   stability,   compatibility,   and   scalability  
  have   been   constant   concerns   in   the   development   of   C++.   Million-line   C++   programs   are   not  
  uncommon.  
  Like   C,   C++   wasn’t   specifically   designed   with   numerical   computation   in   mind.   However,   much  
  numerical,   scientific,   and   engineering   computation   is   done   in   C++.   A   major   reason   for   this   is   that  
  traditional   numerical   work   must   often   be   combined   with   graphics   and   with   computations   relying   on  
  data   structures   that   don’t   fit   into   the   traditional   Fortran   mold   [Budge,1992]   [Barton,1994].   Graphics  
  and   user   interfaces   are   areas   in   which   C++   is   heavily   used.   Anyone   who   has   used   either   an  
  Apple   Macintosh   or   a   PC   running   Windows   has   indirectly   used   C++   because   the   primary   user   interfaces  
  of   these   systems   are   C++   programs.   In   addition,   some   of   the   most   popular   libraries   supporting  
  X   for   UNIX   are   written   in   C++.   Thus,   C++   is   a   common   choice   for   the   vast   number   of   applications  
  in   which   the   user   interface   is   a   major   part.  
  All   of   this   points   to   what   may   be   C++’s   greatest   strength:   its   ability   to   be   used   effectively   for  
  applications   that   require   work   in   a   variety   of   application   areas.   It   is   quite   common   to   find   an   application  
  that   involves   local   and   wide-area   networking,   numerics,   graphics,   user   interaction,   and   database  
  access.   Traditionally,   such   application   areas   have   been   considered   distinct,   and   they   have  
  most   often   been   served   by   distinct   technical   communities   using   a   variety   of   programming   languages.  
  However,   C++   has   been   widely   used   in   all   of   those   areas.   Furthermore,   it   is   able   to   coexist  
  with   code   fragments   and   programs   written   in   other   languages.  
  C++   is   widely   used   for   teaching   and   research.   This   has   surprised   some   who   –   correctly   –   point  
  out   that   C++   isn’t   the   smallest   or   cleanest   language   ever   designed.   It   is,   however  
  –   clean   enough   for   successful   teaching   of   basic   concepts,  
  –   realistic,   efficient,   and   flexible   enough   for   demanding   projects,  
  –   available   enough   for   organizations   and   collaborations   relying   on   diverse   development   and  
  execution   environments,  
  –   comprehensive   enough   to   be   a   vehicle   for   teaching   advanced   concepts   and   techniques,   and  
  –   commercial   enough   to   be   a   vehicle   for   putting   what   is   learned   into   non-academic   use.  
  C++   is   a   language   that   you   can   grow   with.Top

3 楼theoldman(跛脚老人)回复于 2004-04-03 00:41:39 得分 0

C++与C的最大区别是在其思想差异,如果是做工程的话C++会比C好用。尽管两者有着不少的差别,但完全可以直接学习C++,当然能有C底子则更易上手,不过在《C++编程思想》中作者建议就算懂了C,学习C++时还是把它当成新语言来学,个人认为其说得还是有道理的。Top

4 楼angelo23(angelo)回复于 2004-04-03 00:42:12 得分 0

1.2   Learning   C++  
  The   most   important   thing   to   do   when   learning   C++   is   to   focus   on   concepts   and   not   get   lost   in  
  language-technical   details.   The   purpose   of   learning   a   programming   language   is   to   become   a   better  
  programmer;   that   is,   to   become   more   effective   at   designing   and   implementing   new   systems   and   at  
  maintaining   old   ones.   For   this,   an   appreciation   of   programming   and   design   techniques   is   far   more  
  important   than   an   understanding   of   details;   that   understanding   comes   with   time   and   practice.  
  C++   supports   a   variety   of   programming   styles.   All   are   based   on   strong   static   type   checking,   and  
  most   aim   at   achieving   a   high   level   of   abstraction   and   a   direct   representation   of   the   programmer’s  
  ideas.   Each   style   can   achieve   its   aims   effectively   while   maintaining   run-time   and   space   efficiency.  
  A   programmer   coming   from   a   different   language   (say   C,   Fortran,   Smalltalk,   Lisp,   ML,   Ada,   Eiffel,  
  Pascal,   or   Modula-2)   should   realize   that   to   gain   the   benefits   of   C++,   they   must   spend   time   learning  
  and   internalizing   programming   styles   and   techniques   suitable   to   C++.   The   same   applies   to   programmers  
  used   to   an   earlier   and   less   expressive   version   of   C++.  
  Thoughtlessly   applying   techniques   effective   in   one   language   to   another   typically   leads   to   awkward,  
  poorly   performing,   and   hard-to-maintain   code.   Such   code   is   also   most   frustrating   to   write  
  because   every   line   of   code   and   every   compiler   error   message   reminds   the   programmer   that   the   language  
  used   differs   from   ‘‘the   old   language.’’   You   can   write   in   the   style   of   Fortran,   C,   Smalltalk,  
  etc.,   in   any   language,   but   doing   so   is   neither   pleasant   nor   economical   in   a   language   with   a   different  
  philosophy.   Every   language   can   be   a   fertile   source   of   ideas   of   how   to   write   C++   programs.  
  However,   ideas   must   be   transformed   into   something   that   fits   with   the   general   structure   and   type  
  system   of   C++   in   order   to   be   effective   in   the   different   context.   Over   the   basic   type   system   of   a   language,  
  only   Pyrrhic   victories   are   possible.  
  C++   supports   a   gradual   approach   to   learning.   How   you   approach   learning   a   new   programming  
  language   depends   on   what   you   already   know   and   what   you   aim   to   learn.   There   is   no   one   approach  
  that   suits   everyone.   My   assumption   is   that   you   are   learning   C++   to   become   a   better   programmer  
  and   designer.   That   is,   I   assume   that   your   purpose   in   learning   C++   is   not   simply   to   learn   a   new   syntax  
  for   doing   things   the   way   you   used   to,   but   to   learn   new   and   better   ways   of   building   systems.  
  This   has   to   be   done   gradually   because   acquiring   any   significant   new   skill   takes   time   and   requires  
  practice.   Consider   how   long   it   would   take   to   learn   a   new   natural   language   well   or   to   learn   to   play   a  
  new   musical   instrument   well.   Becoming   a   better   system   designer   is   easier   and   faster,   but   not   as  
  much   easier   and   faster   as   most   people   would   like   it   to   be.  
  It   follows   that   you   will   be   using   C++   –   often   for   building   real   systems   –   before   understanding  
  every   language   feature   and   technique.   By   supporting   several   programming   paradigms   (Chapter   2),  
  C++   supports   productive   programming   at   several   levels   of   expertise.   Each   new   style   of   programming  
  adds   another   tool   to   your   toolbox,   but   each   is   effective   on   its   own   and   each   adds   to   your  
  effectiveness   as   a   programmer.   C++   is   organized   so   that   you   can   learn   its   concepts   in   a   roughly   linear  
  order   and   gain   practical   benefits   along   the   way.   This   is   important   because   it   allows   you   to   gain  
  benefits   roughly   in   proportion   to   the   effort   expended.  
  In   the   continuing   debate   on   whether   one   needs   to   learn   C   before   C++,   I   am   firmly   convinced  
  that   it   is   best   to   go   directly   to   C++.   C++   is   safer,   more   expressive,   and   reduces   the   need   to   focus   on  
  low-level   techniques.   It   is   easier   for   you   to   learn   the   trickier   parts   of   C   that   are   needed   to   compensate  
  for   its   lack   of   higher-level   facilities   after   you   have   been   exposed   to   the   common   subset   of   C  
  and   C++   and   to   some   of   the   higher-level   techniques   supported   directly   in   C++.   Appendix   B   is   a  
  guide   for   programmers   going   from   C++   to   C,   say,   to   deal   with   legacy   code.  
  Several   independently   developed   and   distributed   implementations   of   C++   exist.   A   wealth   of  
  tools,   libraries,   and   software   development   environments   are   also   available.   A   mass   of   textbooks,  
  manuals,   journals,   newsletters,   electronic   bulletin   boards,   mailing   lists,   conferences,   and   courses  
  are   available   to   inform   you   about   the   latest   developments   in   C++,   its   use,   tools,   libraries,   implementations,  
  etc.   If   you   plan   to   use   C++   seriously,   I   strongly   suggest   that   you   gain   access   to   such  
  sources.   Each   has   its   own   emphasis   and   bias,   so   use   at   least   two.   For   example,   see   [Barton,1994],  
  [Booch,1994],   [Henricson,1997],   [Koenig,1997],   [Martin,1995].Top

5 楼angelo23(angelo)回复于 2004-04-03 00:43:14 得分 0

TC++PL上原文照抄~楼主不妨一看(绝对值得一看,就当练练英语也好:-)   )Top

6 楼hwbin2008(影子)回复于 2004-04-03 02:00:51 得分 0

拿超级解霸读出来,也别有一番味道Top

7 楼angelo23(angelo)回复于 2004-04-03 08:16:31 得分 0

超级解霸有翻译功能?Top

8 楼segno()回复于 2004-04-03 08:35:07 得分 0

超级解霸可以朗读。Top

9 楼tomren(小泥人)回复于 2004-04-03 08:38:00 得分 0

I   服了   YOU   !Top

10 楼hqlsy(强)回复于 2004-04-03 11:12:56 得分 0

C++向下兼容C,你完全可以直接跳过C而直接学C++。  
  Top

相关问题

  • c#?!?!?!
  • :)C#
  • C#!!!!!
  • C
  • c++
  • C#?
  • C#
  • c++
  • C#?
  • c++

关键词

  • c++
  • programming
  • code
  • programmer
  • techniques
  • maintain
  • effective
  • learning
  • performing
  • level

得分解答快速导航

  • 帖主:bingchuan

相关链接

  • C/C++ Blog
  • C/C++类图书
  • C/C++类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo