项目需要花费一周的时间(全职工作,我不会这样做:b $ b是:-))做得合理,涵盖了一个不错的语言子集,是 有趣,可以在Linux上使用gcc(比如说)没有太多 很多非标准代码。在那里进行软件设计练习 也很有趣。 所以,我有兴趣得到一些建议,因为我觉得 用所有这些知识做*东西*(更重要的是, 找出我不太了解的东西)。谢谢! Michael Strorm ms ***** @ yahoo。 co.uk 解决方案 " Michael Strorm" < MS ***** @ yahoo.co.uk>在消息中写道 新闻:5e ************************* @ posting.google.co m ... 我正处于教学的中间。我自己C ++。已经撇去了21天内自学C ++的部分内容。书,至少我对语言有所了解。然后我买了The C ++ Programming Language因为它已经提供了,我最终还是会在某个阶段购买它。 是的,随着你的知识的增长,我想你会发现这本书很有价值。确保它是第3版或特殊版' 版。以前的添加基本上是 已过时。 另一本非常好的书,特别适用于那些以前用其他语言经验的人,是Koenig & Moo''sAccelerated C ++。 www.acceleratedcpp.com 撇去一些那个,但是有太多的细节(现在) 是的,它的信息:页面比例非常密集。学习 C ++时,我还需要 来补充其他打火机材料。 和我知道我不会接受它,如果我实际上没有练习用C ++写*程序。 是的,很高兴您意识到这一点。通过实践来学习。 我得到了非常强烈的印象(比在C中更多)学会写正确的C ++程序不能通过简短的问题练习来完成。 短期练习是一个良好的开端,特别是要证明你自己了解一个特定的概念。 获得到了这一点,我想要开始一个中等规模的项目,需要一个星期(全职工作,我不会成为:-)) 不要对你的时间估计过于乐观。如果事情需要的时间远远超过您的期望,请不要担心。对于专业人士来说,最困难的任务之一就是制作 (以及会议!)的时间估算。只有练习和经验 才有助于此。并且已经构建了一个代码库,有用的功能有助于开发速度。 代码重用的概念。在编写函数时,请记住 这可以是''概括''在其他 上下文中有用吗?情况并非总是如此,但往往是,b / b 在做出决定之前需要先考虑一下。什么 参数应该是,如果有的话。例如。如果你写一个 函数来输出一个对象的内容,你可以使用'c $''b $ b''硬代码''或者你可以定义一个类型为std :: ostream&的参数,在这种情况下, 函数可以对文件(std :: ofstream)进行操作,因为 以及''cout''。 做得合理,涵盖了一个不错的语言部分,有趣的事情, 只有你能知道你发现什么''有趣''。例如。很多 都渴望写出酷炫的图形游戏等等。(btw 在学习语言时是一个非常高级的话题, 特别是因为你需要特定于平台的''扩展'' 和特殊目的库)。例如。游戏不感兴趣 我,无论是图形还是其他 - 我有更多的乐趣与 数据库和文本操作。但那只是我。 并且可以在Linux上使用gcc(比如没有太多非标准代码)。 学习时,你应该远离所有非标准的 (例如平台特定的)结构。首先学习语言 。那么重要的不是你的平台是什么(C ++ 是一种独立于平台的语言。) 获得一些练习也很有趣 设计并不是真的很热门,但我们可以帮助你 整理你的代码,以便最好地利用 语言的强大功能,防止常见错误等。软件 设计本身可以更好地讨论,例如comp.programming和/或comp.algorithms等组合b / b 。 通常,特定的算法类别都有自己的 组,例如密码学。 所以,我有兴趣得到一些建议,因为我觉得用所有这些知识做*东西* 是的,用你新发现的技能实际构建一些有用和/或有趣的东西是非常令人满意的。 (更重要的是,找出什么我不太了解。谢谢! 我用C ++做的第一个''非常重要'的事情( 许多小练习之后)是一个小小的联系人''数据库带 例如姓名,地址,电话号码等等。那是因为 我对数据库很感兴趣,而且那个地方我已经有了b $ b与其他语言一起,并且拥有最多的体验。 提示:使用标准库。它* *非常强大, 并允许您立即开始应用''代码重用'。 花一些时间学习容器,迭代器, 和标题< algorithm> 声明的算法使用它们。 *非常*功能强大且灵活的东西可以用它们完成。这让我想起:一本非常好的书是 Josuttis'''C ++ Standard Library" www.josuttis.com/libbook HTH, -Mike 2003年10月1日15:30:14 -0700, ms ***** @ yahoo.co.uk (Michael Strorm) 写道: [ snip] 所以,我有兴趣得到一些建议,因为我觉得用所有这些知识来做某事*(更重要的是, 你可以写一个小文字冒险。它不需要做太多,但是只需要将它提升到框架级别,你将不得不用I / O和字符串操作来完成很多工作。 。有很多 机会来定义类或使用STL。拥有 框架后,您可以使用其他适合自己喜欢的东西。 此致, Gene Wirchenko > [snip] 所以,我有兴趣得到一些建议,因为我觉得用所有这些知识来做某事*(和更重要的是,找出我不太清楚的东西。谢谢! 你可以写一个小文字冒险。它不需要做太多,但只是为了将它提升到框架级别,你将不得不用I / O和字符串操作进行大量的工作。有很多机会来定义类或使用STL。在你拥有框架后,你可以使用很多适合你想象的其他东西。 但请问,在你问之前,没有在C ++中清除屏幕的方式或 改变输出的颜色:) Jonathan Hi,I''m in the middle of "teaching" myself C++. Having skimmed some ofthe "Teach Yourself C++ in 21 Days" book, I got a feel for thelanguage, at least. Then I bought "The C++ Programming Language"because it was on offer, and I''d have ended up buying it at some stageanyway.Skimmed some of that, but there''s too much detail (for now) and Iknow I won''t take it in if I don''t get some practice in actually*writing* programs in C++. I''m getting the very strong impression that(much more so than in C) learning to write "proper" C++ programs can''tjust be done through short question exercises.To get to the point, I''m wanting to start a moderately-sizedproject that would take a week (working full time on it, which I won''tbe :-) ) to do reasonably, cover a decent subset of the language, beinteresting to do, and workable under (say) gcc on Linux (without toomuch nonstandard code). It''d also be interesting to get some practicein software design in there.So, I''d be interested to get some suggestions, because I feel likedoing *something* with all this knowledge (and more importantly,finding out what I don''t know well). Thanks!Michael Strorm ms*****@yahoo.co.uk 解决方案 "Michael Strorm" <ms*****@yahoo.co.uk> wrote in messagenews:5e*************************@posting.google.co m... Hi, I''m in the middle of "teaching" myself C++. Having skimmed some of the "Teach Yourself C++ in 21 Days" book, I got a feel for the language, at least. Then I bought "The C++ Programming Language" because it was on offer, and I''d have ended up buying it at some stage anyway.Yes, as your knowledge grows, I think you''ll find thisbook quite valuable. Make sure it''s the 3rd or ''special''edition though. Previous additions are essentiallyobsolete.Another very good book, especially for those who haveprevious experience with other languages, is Koenig& Moo''s "Accelerated C++". www.acceleratedcpp.com Skimmed some of that, but there''s too much detail (for now)Yes, it''s info:page ratio is quite dense. I also neededto supplement it with other ''lighter'' material when learningC++.and I know I won''t take it in if I don''t get some practice in actually *writing* programs in C++.Yes, good that you realize that. Learn by doing. I''m getting the very strong impression that (much more so than in C) learning to write "proper" C++ programs can''t just be done through short question exercises.Short exercises are good start, especially to prove toyourself you understand a particular concept(s). To get to the point, I''m wanting to start a moderately-sized project that would take a week (working full time on it, which I won''t be :-) )Don''t be too optimistic with your time estimates. Don''tworry if something takes far longer than you expect. Evenfor professionals, one of the most difficult tasks is making(and meeting!) time estimates. Only practice and experiencewill help with this. And having built up a ''code base'' ofuseful functions helps a lot toward ''speed of development''.The concept of code reuse. When writing a function, keepin mind "can this be ''generalized'' to be useful in othercontexts?" This won''t always be the case, but often is,given a bit of forethought before deciding e.g. whatthe parameters should be, if any. E.g. if you write afunction to output the contents of an object, you could''hard code'' it to use ''cout'', or you could defined aparameter of type std::ostream&, in which case thefunction could operate upon a file (std::ofstream) aswell as on ''cout''.to do reasonably, cover a decent subset of the language, be interesting to do,Only you can know what you find ''interesting''. E.g. manyare eager to write ''cool graphics games'' etc. (which btwis a far too advanced topic when learning the language,especially since you''ll need platform-specific ''extensions''and special purpose libraries). E.g. Games don''t interestme at all, graphical or otherwise -- I have more fun withdatabases and text manipulation. But that''s just me. and workable under (say) gcc on Linux (without too much nonstandard code).When learning, you should stay away from all nonstandard(e.g. platform-specific) constructs. Learn the languagefirst. Then it matters not what your platform is (C++is a ''platform-independent'' language.)It''d also be interesting to get some practice in software design in there.Design isn''t really topical here, but we can help youorganize your code to best take advantage of thelanguage''s power, prevent common errors etc. Softwaredesign itself would be better discussed in groups suchas comp.programming and/or comp.algorithms, etc.Often specific algorithm categories have their owngroups, e.g. cryptography. So, I''d be interested to get some suggestions, because I feel like doing *something* with all this knowledgeYes, it is very satisfying to actually build somethinguseful and/or interesting with your new found skills.(and more importantly, finding out what I don''t know well). Thanks!The first ''nontrivial'' thing I did with C++ (aftermany small exercises) was a small ''contacts'' database withe.g. names, addresses, phone numbers, etc. That''s becauseI''m interested in databases, and that''s an area where Ialready have skill with other languages, and have the mostexperience.Hint: Use the standard library. It is *very* powerful,and lets you start applying ''code reuse'' immediately.Spend some time learning about containers, iterators,and the algorithms declared by header <algorithm>which uses them. *Very* powerful and flexible things canbe done with them. Which reminds me: A very good book to have isJosuttis'' "The C++ Standard Library" www.josuttis.com/libbookHTH,-MikeOn 1 Oct 2003 15:30:14 -0700, ms*****@yahoo.co.uk (Michael Strorm)wrote:[snip] So, I''d be interested to get some suggestions, because I feel likedoing *something* with all this knowledge (and more importantly,finding out what I don''t know well). Thanks!You could write a small text adventure. It need not do much, butjust to bring it up to framework level, you are going to have to do alot of work with I/O and string manipulation. There are plenty ofopportunities to define classes or use STL. After you have theframework, you can bolt on a lot of other stuff that fits your fancy.Sincerely,Gene Wirchenko > [snip] So, I''d be interested to get some suggestions, because I feel likedoing *something* with all this knowledge (and more importantly,finding out what I don''t know well). Thanks! You could write a small text adventure. It need not do much, but just to bring it up to framework level, you are going to have to do a lot of work with I/O and string manipulation. There are plenty of opportunities to define classes or use STL. After you have the framework, you can bolt on a lot of other stuff that fits your fancy.But PLEASE, before you ask, there is no way in C++ to clear the screen orchange the colour of the output :)Jonathan 这篇关于迷你项目建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-13 19:12