OOD和C ++ [英] OOD and C++

查看:75
本文介绍了OOD和C ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我希望大家一定认识我。我发布在这里

有些时候&然后在我得到答案后消失(好吧,我消失了

只因为两个原因:第一,我没有任何网络连接。

第二我总是应用*的东西*你们大家告诉我,申请

分析需要花费很多时间。无论如何,你们总是帮助我们和你们的帮助,我不再是新手,现在我可以阅读并且

了解为程序员编写的书籍,一些

例外,当然。我在使用c ++时遇到了问题(是的,我已经决定启动c ++)。像往常一样,我搜索了

comp.lang.c ++的档案,以获得我的问题的答案,这至少解决了问题的50%b,接下来,阅读常见问题解答消除了大部分额外的疑惑我已经b $ b了。现在我已经离开了一些我不确定的东西。


我想开始用C ++开始职业生涯。实际上我看了DICE.com并且我看到了美国主要州60%的工作需要c ++技能

剩余的40%属于Java /.NET(2006年5月)。我的主要问题

是工作,同时我也想成为一名优秀的程序员。我通过以下书籍获得了



1.)对符号计算的温和介绍 - David S.Touretzky


2.)Practical Common LISP - Peter Seibel(见第22章)

由于工作问题,
i停止阅读它。


i非常肯定一件事,我不知道如果我想要的话需要学习C

是学习C ++。我想问的是:


- 在我深入研究

C ++之前,我是否需要学习像Ruby这样的OO语言。我也阅读了不同的帖子和Stroustrup的常见问题解答。但这让我感到很尴尬。我不是在谈论smalltalk。我在谈论

范例,而C ++是一种多范式语言。关于OOD,我不太了解

。我所知道的是,在OOD中我们可以将我们的程序

构建成不同的数据类型,然后我们定义对这些数据的操作

类型。一个类可以有任意数量的实例,我知道单个

继承和多重继承。除了这些我不知道

关于OOD的任何事情。 -


你会在我学习c ++之前推荐我做Ruby(它是OO)吗?


i想要遵循这条道路:SICP - > C ++或


我需要做Ruby - > SICP - > C ++


任何观点?


(我也在学习数学,这样我才能理解

Knuth'的算法。)


--arnuld

hello all,
i hope you folks must have recognised me. i posted here
some times & then disappear after i got answers (well, i disappear
only because of 2 reasons: 1st, i do not have any internet connection.
2nd i always apply the *things* you folks tell me and application of an
analysis takes a lot of time). anyway you people always helped me and
with *your* help, i am no longer a newbie, now i can read and
understand books which are written for programmers, with some
exceptions, of course. i have a problem in starting with c++ (yes, i
have decided to start c++). as usual, i searched the archives of
comp.lang.c++ for the answers to my question and that solved at least
50% of the problem,next, reading FAQS removed most of extra doubts i
had. now i have left with something i am not sure of.

i want to start a career in C++ . actually i looked at DICE.com and i
saw that for 60% of jobs in USA''s major states c++ skills were wanted
and remaining 40% belonged to Java/.NET(as of MAY 2006). my main issue
is job and in the meantime i also want to become a good programmer. I
have been through the following books:

1.) "A gentle introduction to symbolic computation" - David S.Touretzky

2.) "Practical Common LISP" - Peter Seibel (upto chapter 22)

i stopped reading it because of job issue.

i am very sure about one thing, i do not need to learn C if all i want
is to learn C++. what i wan to ask is:

-- do i need to learn an OO langugae, like Ruby, before i dive into
C++. i read different posts and Stroustrup''s FAQS too. but that left me
with ambiguity. i am not talking of smalltalk. i am talking of
paradigms and C++ is a multi-paradigm language. i dont know too much
about OOD. all i know is that in OOD we can structure our programme
into different data types and then we define operations on those data
types. a class can have any number of instances and i know about single
inheritance and multiple inheritance. except these i do not know
anything about OOD. --

will you people recommend me doing Ruby (it is OO) before i learn c++?

i want to follow this path: SICP -> C++ or

do i need to do Ruby -> SICP -> C++

any views?

(i am also learning Maths along the way so that i can understand
Knuth''s algorithms.)

--arnuld

推荐答案

arnuld发布:

arnuld posted:

我非常确定一件事,如果我想要的话,我不需要学习C学习C ++。



C ++是C的超集。C Subset C ++中包含的内容与C在少数几个地方的价格相差无几。以下是它们的列表:

http: //david.tribble.com/text/cdiffs.htm


虽然你说你不需要学习C是正确的。为了用C ++编程,我会主张阅读C书,因为C ++书籍

往往过于关注花哨的功能,而不是给出一个坚实的

了解数组,指针等核心功能。


- 在我深入研究之前,我是否需要学习OO语言,如Ruby > C ++。



当我开始使用Visual Basic时,我大约十一或十二岁。几年

后来我得到了C ++ for Dummies。离开我当地的图书馆。再过几年

之后,我现在是一位专业的C ++程序员。


我也阅读了不同的帖子和Stroustrup的常见问题解答。但这让我感到含糊不清。我不是在谈论smalltalk。我说的是范式,而C ++是一种多范式的语言。关于OOD,我不太了解。我所知道的是,在OOD中我们可以将我们的程序构建成不同的数据类型,然后我们定义对这些数据类型的操作。一个类可以有任意数量的实例,我知道单个继承和多重继承。除了这些我不知道关于OOD的任何事情。



面向对象设计只是在一个地方保留所有复杂性

,因此很容易让其他部分你的

编程代码与这些复杂的东西互动部分代码。对于

实例,如果我是银行,我不想知道账户是如何运作的,

我只想做一些简单的事情用它:


void Bank :: CloseAccount(unsigned long index)

{

holder [index] .Close() ;

}


(这里,银行不知道帐户必须在
$ b中发送一封信$ b发到税务局。)


你会在我学习c ++之前推荐我做Ruby(它是OO)吗?
i am very sure about one thing, i do not need to learn C if all i want
is to learn C++.

C++ is a superset of C. The "C Subset" which C++ contains only differs
from C in a handful of places. Here''s a list of them:

http://david.tribble.com/text/cdiffs.htm

While you''re correct in saying that you "don''t need to learn C" in order
to program in C++, I would advocate reading C books, because C++ books
tend to focus too much on fancy features, rather than giving a solid
understanding of the core features like arrays, pointers, etc.

-- do i need to learn an OO langugae, like Ruby, before i dive into
C++.

No. I was about eleven or twelve when I started Visual Basic. A few years
later I got "C++ for Dummies" out of my local library. Another few years
later and I''m now an expert C++ programmer.

i read different posts and Stroustrup''s FAQS too. but that left me
with ambiguity. i am not talking of smalltalk. i am talking of
paradigms and C++ is a multi-paradigm language. i dont know too much
about OOD. all i know is that in OOD we can structure our programme
into different data types and then we define operations on those data
types. a class can have any number of instances and i know about single
inheritance and multiple inheritance. except these i do not know
anything about OOD.

Object Orientated Design is just about keeping all the "complicatedness"
in one place, thus making it very easy for other parts of your
programming code to interact with these "complicated" parts of code. For
instance, if I''m a bank, I don''t want to know about how an account works,
I just want to be able to do simple stuff with it:

void Bank::CloseAccount( unsigned long index )
{
holders[index].Close();
}

(Here, the bank doesn''t know that "account" has to send a letter in the
post to the Tax Office.)

will you people recommend me doing Ruby (it is OO) before i learn c++?



如果你想学习C ++,那就去学习C ++ - 你不需要任何

踏脚石,你只需要一本好书。

-Tomás


If you want to learn C++, the just go and learn C++ -- you don''t need any
stepping stones, you just need a good book.
-Tomás


Tomás写道:
arnuld发布:
arnuld posted:
我非常肯定一件事,我如果我只想要学习C ++,就不需要学习C语言。
i am very sure about one thing, i do not need to learn C if all i want
is to learn C++.



C ++是C的超集。C Subset C ++中包含的内容与C在少数几个地方有所不同。以下是它们的列表:

http: //david.tribble.com/text/cdiffs.htm

虽然你说你不需要学习C是正确的。为了用C ++编程,我主张阅读C书,因为C ++书籍往往过于关注花哨的功能,而不是对数组之类的核心功能有一个扎实的了解,指针等。



C++ is a superset of C. The "C Subset" which C++ contains only differs
from C in a handful of places. Here''s a list of them:

http://david.tribble.com/text/cdiffs.htm

While you''re correct in saying that you "don''t need to learn C" in order
to program in C++, I would advocate reading C books, because C++ books
tend to focus too much on fancy features, rather than giving a solid
understanding of the core features like arrays, pointers, etc.




好​​笑,我认为数组和指针的核心功能是

,应该尽可能避免赞成幻想 (即,
异常安全,自动删除,可选择边界检查,

理解原始指针和数组当然是必要的,但是知道如何以及何时使用他们的替代品也很重要。 (至于

何时使用它们,答案是,只要你可以。使用原始指针

和数组只在你必须时。参见FAQ:
http:// www。 parashift.com/c++-faq-lit....html#faq-34.1

你会不会有人推荐我这样做在学习c ++之前Ruby(它是OO)?
will you people recommend me doing Ruby (it is OO) before i learn c++?



如果你想学习C ++,那就去学习C ++ - 你不需要任何步骤石头,你只需要一本好书。



If you want to learn C++, the just go and learn C++ -- you don''t need any
stepping stones, you just need a good book.




同意。请参阅以下有关学习OO和C ++的常见问题解答:

http://www.parashift.com/c++-faq-lit...learn-cpp.html


至于一本好书,_Accelerated C ++ _ by Koenig和Moo从头开始教授C ++

。 (顺便说一句,它在指针和阵列之前提供标准容器

。)


干杯! --M



Agreed. See these FAQs on learning OO and C++:

http://www.parashift.com/c++-faq-lit...learn-cpp.html

As for a good book, _Accelerated C++_ by Koenig and Moo teaches C++ the
right way from the ground up. (BTW, it presents standard containers
well before pointers and arrays.)

Cheers! --M


mlimber发布:
mlimber posted:
(至于何时使用它们,答案是, ;无论什么时候你都可以。只在你必须的时候使用原始指针和数组。参见FAQ:
http://www.parashift.com/c++-faq-lit....html#faq-34.1 。)
(As to when to use them, the answer is, "Whenever you
can. Use raw pointers and arrays only when you must." See the FAQ:
http://www.parashift.com/c++-faq-lit....html#faq-34.1.)



一个程序员试图将他的学说推向另一个程序员的'

喉咙。


我写的可重复使用用于将货币金额转换为

三种不同语言的文本的代码。它没有使用任何标准C ++花哨的

类,只是简单的旧char数组和指针。

-Tomás


One programmer trying to shove his doctrine down another programmer''s
throat.

I have written reusable code for converting a monetary amount to text in
three different languages. It doesn''t use any of the Standard C++ fancy
classes, just plain old char arrays and pointers.
-Tomás


这篇关于OOD和C ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆