亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? 021.htm

?? 21天內快速掌握c++語言
?? HTM
?? 第 1 頁 / 共 5 頁
字號:
<BR>
<PRE><FONT COLOR="#0066FF" font style="font-size:10pt">n++; // n is incremented by one
</FONT></PRE>
<BR>
<UL>
	<LI>This comment isn't worth the time it takes to type it in. Concentrate on the
	semantics of functions and blocks of code. Say what a function does. Indicate side
	effects, types of parameters, and return values. Describe all assumptions that are
	made (or not made), such as &quot;<TT>assumes </TT>n<TT> is non-negative</TT>&quot;
	or &quot;<TT>will return -1 if </TT>x<TT> is invalid</TT>&quot;. Within complex logic,
	use comments to indicate the conditions that exist at that point in the code.
	<P>
	<LI>Use complete English sentences with appropriate punctuation and capitalization.
	The extra typing is worth it. Don't be overly cryptic and don't abbreviate. What
	seems exceedingly clear to you as you write code will be amazingly obtuse in a few
	months.
	<P>
	<LI>Use blank lines freely to help the reader understand what is going on. Separate
	statements into logical groups.
</UL>
<BR>
<CENTER>
<H4><A NAME="Heading39"></A><FONT COLOR="#000077">Access</FONT></H4>
</CENTER>
<P>The way you access portions of your program should also be consistent. Some tips
for access include these:
<BR>
<UL>
	<LI>Always use <TT>public:</TT>, <TT>private:</TT>, and <TT>protected:</TT> labels;
	don't rely on the defaults.
	<P>
	<LI>List the public members first, then protected, then private. List the data members
	in a group after the methods.
	<P>
	<LI>Put the constructor(s) first in the appropriate section, followed by the destructor.
	List overloaded methods with the same name adjacent to each other. Group accessor
	functions together when possible.
	<P>
	<LI>Consider alphabetizing the method names within each group and alphabetizing the
	member variables. Be sure to alphabetize the filenames in <TT>include</TT> statements.
	<P>
	<LI>Even though the use of the <TT>virtual</TT> keyword is optional when overriding,
	use it anyway; it helps to remind you that it is virtual, and also keeps the declaration
	consistent.
</UL>
<BR>
<CENTER>
<H4><A NAME="Heading40"></A><FONT COLOR="#000077">Class Definitions</FONT></H4>
</CENTER>
<P>Try to keep the definitions of methods in the same order as the declarations.
It makes things easier to find.</P>
<P>When defining a function, place the return type and all other modifiers on a previous
line so that the class name and function name begin on the left margin. This makes
it much easier to find functions.
<CENTER>
<H4><A NAME="Heading41"></A><FONT COLOR="#000077">include Files</FONT></H4>
</CENTER>
<P>Try as hard as you can to keep from including files into header files. The ideal
minimum is the header file for the class this one derives from. Other mandatory <TT>include</TT>s
will be those for objects that are members of the class being declared. Classes that
are merely pointed to or referenced only need forward references of the form.</P>
<P>Don't leave out an <TT>include</TT> file in a header just because you assume that
whatever CPP file includes this one will also have the needed <TT>include</TT>.
<BR>
<BR>
<BLOCKQUOTE>
	<P>
<HR>
<FONT COLOR="#000077"><B>TIP:</B></FONT><B> </B>All header files should use inclusion
	guards.
<HR>
<BR>
<BR>
</BLOCKQUOTE>
<BR>
<CENTER>
<H4><A NAME="Heading42"></A><FONT COLOR="#000077">assert()</FONT></H4>
</CENTER>
<P>Use <TT>assert()</TT> freely. It helps find errors, but it also greatly helps
a reader by making it clear what the assumptions are. It also helps to focus the
writer's thoughts around what is valid and what isn't.
<CENTER>
<H4><A NAME="Heading43"></A><FONT COLOR="#000077">const</FONT></H4>
</CENTER>
<P>Use <TT>const</TT> wherever appropriate: for parameters, variables, and methods.
Often there is a need for both a <TT>const</TT> and a non-<TT>const</TT> version
of a method; don't use this as an excuse to leave one out. Be very careful when explicitly
casting from <TT>const</TT> to non-<TT>const</TT> and vice versa (there are times
when this is the only way to do something), but be certain that it makes sense, and
include a comment.
<CENTER>
<H3><A NAME="Heading44"></A><FONT COLOR="#000077">Next Steps</FONT></H3>
</CENTER>
<P>You've spent three long, hard weeks working at C++, and you are now a competent
C++ programmer, but you are by no means finished. There is much more to learn and
many more places you can get valuable information as you move from novice C++ programmer
to expert.</P>
<P>The following sections recommend a number of specific sources of information,
and these recommendations reflect only my personal experience and opinions. There
are dozens of books on each of these topics, however, so be sure to get other opinions
before purchasing.
<CENTER>
<H4><A NAME="Heading45"></A><FONT COLOR="#000077">Where to Get Help and Advice</FONT></H4>
</CENTER>
<P>The very first thing you will want to do as a C++ programmer will be to tap into
one or another C++ conference on an online service. These groups supply immediate
contact with hundreds or thousands of C++ programmers who can answer your questions,
offer advice, and provide a sounding board for your ideas.</P>
<P>I participate in the C++ Internet newsgroups (<TT>comp.lang.c++ </TT>and<TT> comp.lang.c++.moderated</TT>),
and I recommend them as excellent sources of information and support.</P>
<P>Also, you may want to look for local user groups. Many cities have C++ interest
groups where you can meet other programmers and exchange ideas.
<CENTER>
<H4><A NAME="Heading46"></A><FONT COLOR="#000077">Required Reading</FONT></H4>
</CENTER>
<P>The very next book I'd run out and buy and read is</P>
<P>Meyers, Scott. Effective C++ (ISBN: 0-201-56364-9). Addison-Wesley Publishing,
1993.</P>
<P>This is by far the most useful book I've ever read, and I've read it three times.
<CENTER>
<H4><A NAME="Heading47"></A><FONT COLOR="#000077">Magazines</FONT></H4>
</CENTER>
<P>There is one more thing you can do to strengthen your skills: subscribe to a good
magazine on C++ programming. The absolute best magazine of this kind, I believe,
is C++ Report from SIGS Publications. Every issue is packed with useful articles.
Save them; what you don't care about today will become critically important tomorrow.</P>
<P>You can reach C++ Report at SIGS Publications, P.O. Box 2031, Langhorne, PA 19047-9700.
I have no affiliation with the magazine (I work for two other publishers!), but their
magazine is the best, bar none.
<CENTER>
<H4><A NAME="Heading48"></A><FONT COLOR="#000077">Staying in Touch</FONT></H4>
</CENTER>
<P>If you have comments, suggestions, or ideas about this book or other books, I'd
love to hear them. Please write to me at <TT>jliberty@libertyassociates.com</TT>,
or check out my Web site: <TT>www.libertyassociates.com</TT>. I look forward to hearing
from you.
<BR>
<BR>
<BLOCKQUOTE>
	<P>
<HR>
<B>DO</B> look at other books. There's plenty to learn and no single book can teach
	you everything you need to know. <B>DON'T</B> just read code! The best way to learn
	C++ is to write C++ programs. <B>DO </B>subscribe to a good C++ magazine and join
	a good C++ user group.
<HR>
<BR>
<BR>
</BLOCKQUOTE>
<BR>
<CENTER>
<H3><A NAME="Heading49"></A><FONT COLOR="#000077">Summary</FONT></H3>
</CENTER>
<P>Today you saw how some of the standard libraries shipped with your C++ compiler
can be used to manage some routine tasks. <TT>Strcpy()</TT>, <TT>strlen()</TT>, and
related functions can be used to manipulate null-terminated strings. Although these
won't work with the string classes you create, you may find that they provide functionality
essential to implementing your own classes.</P>
<P>The time and date functions allow you to obtain and manipulate time structures.
These can be used to provide access to the system time for your programs, or they
can be used to manipulate time and date objects you create.</P>
<P>You also learned how to set and test individual bits, and how to allocate a limited
number of bits to class members.</P>
<P>Finally, C++ style issues were addressed, and resources were provided for further
study.
<CENTER>
<H3><A NAME="Heading50"></A><FONT COLOR="#000077"><B>Q&amp;A</B></FONT></H3>
</CENTER>
<BR>
<DL>
	<DD><B>Q. Why are the standard libraries included with C++ compilers, and when would
	you use them?</B><BR>
	<BR>
	<B>A. </B>They are included for backwards-compatibility with C. They are not type-safe,
	and they don't work well with user-created classes, so their use is limited. Over
	time, you might expect all of their functionality to be migrated into C++ specific
	libraries, at which time the standard C libraries would become obsolete.<BR>
	<BR>
	<B>Q. When would you use bit structures rather than simply using integers?<BR>
	</B><BR>
	<B>A.</B> When the size of the object is crucial. If you are working with limited
	memory or with communications software, you may find that the savings offered by
	these structures is essential to the success of your product.<BR>
	<BR>
	<B>Q. Why do style wars generate so much emotion?<BR>
	</B><BR>
	<B>A.</B> Programmers become very attached to their habits. If you are used to this
	indentation,
</DL>
<BR>
<PRE><FONT COLOR="#0066FF" font style="font-size:10pt">if (SomeCondition){
// statements
}    // closing brace
</FONT></PRE>
<BR>
<DL>
	<DD>it is a difficult transition to give it up. New styles look wrong and create
	confusion. If you get bored, try logging onto a popular online service and asking
	which indentation style works best, which editor is best for C++, or which product
	is the best word processor. Then sit back and watch as ten thousand messages are
	generated, all contradicting one another.<BR>
	<BR>
	<B>Q. What is the very next thing to read?<BR>
	</B><BR>
	<B>A.</B> Tough question. If you want to review the fundamentals, read one of the
	other primers. If you want to hone C++, run out and get Scott Meyers' Effective C++.
	Finally, if you want to write for Windows or the Mac, it might make sense to pick
	up a primer on the <BR>
	platform.<BR>
	<BR>
	<B>Q. Is that it?<BR>
	</B><BR>
	<B>A.</B> Yes! You've learned C++, but...no. Ten years ago it was possible for one
	person to learn all there was to know about microcomputers, or at least to feel pretty
	confident that he was close. Today it is out of the question: You can't possibly
	catch up, and even as you try the industry is changing. Be sure to keep reading,
	and stay in touch with the resources that will keep you up with the latest changes:
	magazines and online services.
</DL>
<BR>
<CENTER>
<H4><A NAME="Heading51"></A><FONT COLOR="#000077">Quiz</FONT></H4>
</CENTER>
<BR>
<DL>
	<DD><B>1.</B> What is the difference between <TT>strcpy()</TT> and <TT>strncpy()</TT>?<BR>
	<BR>
	<B>2.</B> What does <TT>ctime()</TT> do?<BR>
	<BR>
	<B>3.</B> What is the function to call to turn an ASCII string into a <TT>long</TT>?<BR>
	<BR>
	<B>4.</B> What does the complement operator do?<BR>
	<BR>
	<B>5.</B> What is the difference between <TT>OR</TT> and exclusive <TT>OR</TT>?<BR>
	<BR>
	<B>6.</B> What is the difference between <TT>&amp;</TT> and <TT>&amp;&amp;</TT>?<BR>
	<BR>
	<B>7.</B> What is the difference between <TT>|</TT> and <TT>||</TT>?
</DL>
<BR>
<CENTER>
<H4><A NAME="Heading52"></A><FONT COLOR="#000077">Exercises</FONT></H4>
</CENTER>
<BR>
<DL>
	<DD><B>1.</B> Write a program to safely copy the contents of a 20-byte string to
	a 10-byte string, truncating whatever won't fit.<BR>
	<BR>
	<B>2.</B> Write a program that tells the current date in the form 7/28/94.<BR>
	<BR>
	<B>3.</B> Write a program that creates 26 flags (labeled a-z). Prompt the user to
	enter a sentence, and then quickly report on which letters were used by setting and
	then reading the flags.<BR>
	<B><BR>
	4.</B> Write a program that adds two numbers without using the addition operator
	(<TT>+</TT>). Hint: use the bit operators!
</dl>
 

</TD>
<TD CLASS="tt3" VALIGN="bottom" width="8%"  bgcolor="#ffffff"><strong><A HREF="index.html"><FONT style="FONT-SIZE: 9pt">后一頁</font></A><BR>
<A HREF="020.htm"><FONT style="FONT-SIZE: 9pt">前一頁</font></A></tr>
</table>

<p align="center"><script src="../../../2.js"></script> </p>
</body>
</html>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品欧美一区二区三区不卡 | 一区二区三区免费网站| 国产一区二区精品久久91| 久久久久久久久久电影| 国产二区国产一区在线观看| 亚洲国产精品成人综合色在线婷婷| 大尺度一区二区| 亚洲日本丝袜连裤袜办公室| 在线视频国内自拍亚洲视频| 偷拍亚洲欧洲综合| 精品国产乱码久久久久久影片| 国产精品18久久久久久久久| 1024成人网| 欧美三电影在线| 精品中文av资源站在线观看| 中文字幕精品一区二区精品绿巨人| 99久久免费视频.com| 亚洲成av人片观看| wwwwxxxxx欧美| 色婷婷精品久久二区二区蜜臀av| 洋洋成人永久网站入口| 欧美一区二区三区免费大片 | 午夜不卡av在线| 欧美成人一区二区| www.99精品| 日韩高清不卡在线| 中文字幕av一区二区三区免费看| 91国在线观看| 国产专区欧美精品| 亚洲综合成人在线视频| 精品久久久久久最新网址| 色视频一区二区| 国产美女在线观看一区| 亚洲午夜在线观看视频在线| 精品国产在天天线2019| 色综合久久久久综合99| 韩国女主播一区二区三区| 亚洲少妇屁股交4| 欧美成人在线直播| 欧美日韩国产在线观看| 国产成人在线视频网站| 石原莉奈在线亚洲二区| 国产精品毛片无遮挡高清| 91麻豆精品国产自产在线观看一区| 色悠悠亚洲一区二区| 蜜桃视频第一区免费观看| 亚洲欧美日韩电影| 国产欧美va欧美不卡在线| 91精品国产综合久久婷婷香蕉| 不卡的电影网站| 美女国产一区二区| 一区二区久久久久| 日韩美女精品在线| 国产日韩欧美一区二区三区乱码 | 韩国女主播一区| 青椒成人免费视频| 亚洲一区二区三区中文字幕在线| 欧美激情自拍偷拍| 日韩免费看的电影| 欧美丰满少妇xxxxx高潮对白| 99国产一区二区三精品乱码| 黄一区二区三区| 日韩中文字幕91| 亚洲国产视频一区二区| 亚洲精品高清视频在线观看| 国产精品视频九色porn| 久久久久久久久久久久久女国产乱| 欧美一区二区免费视频| 欧美伦理影视网| 欧美日韩国产首页| 欧美吞精做爰啪啪高潮| 欧美在线观看视频一区二区三区| 91丨九色丨黑人外教| 丁香另类激情小说| a级高清视频欧美日韩| 国产91高潮流白浆在线麻豆| 国产精品一区专区| 国产成人亚洲综合色影视| 国内久久婷婷综合| 高清在线不卡av| zzijzzij亚洲日本少妇熟睡| 成人中文字幕合集| 99视频在线精品| 在线亚洲一区二区| 欧美性受极品xxxx喷水| 欧美日韩另类国产亚洲欧美一级| 欧美日韩一区二区在线观看| 欧美另类高清zo欧美| 5858s免费视频成人| 欧美电影免费观看高清完整版在 | 国产一区二区三区| 国产一区二区三区精品欧美日韩一区二区三区 | 日本不卡1234视频| 美女爽到高潮91| 粉嫩在线一区二区三区视频| 99国产精品一区| 在线观看视频一区| 欧美日韩国产欧美日美国产精品| 欧美丰满少妇xxxbbb| 亚洲精品一区二区三区影院 | 天天综合色天天| 美日韩一区二区三区| 粉嫩一区二区三区在线看| 99re亚洲国产精品| 欧美精品v日韩精品v韩国精品v| 欧美大片在线观看| 国产精品国产三级国产aⅴ入口| 一区二区三区毛片| 日韩精品一二三| 国产91丝袜在线18| 精品视频一区二区三区免费| 精品国产乱码久久久久久蜜臀| 亚洲国产精品高清| 香蕉av福利精品导航| 国产成人在线观看免费网站| 色婷婷国产精品综合在线观看| 欧美一级专区免费大片| 国产亚洲短视频| 亚洲成av人影院| 国产精品一区三区| 精品视频免费看| 亚洲国产高清在线| 亚洲不卡在线观看| 成人av先锋影音| 91精品久久久久久蜜臀| 中文字幕视频一区| 久久99国产精品麻豆| 色狠狠一区二区| 国产日产欧美精品一区二区三区| 亚洲一区二区影院| 国产精品18久久久久久久久| 制服视频三区第一页精品| 国产精品色一区二区三区| 日韩电影网1区2区| 91一区一区三区| 中文在线资源观看网站视频免费不卡| 亚洲小说欧美激情另类| 国产999精品久久| 欧美r级在线观看| 五月天激情综合网| 色综合视频在线观看| 久久久久久亚洲综合| 日韩国产欧美视频| 欧美日韩电影一区| 日韩一区在线免费观看| 国产+成+人+亚洲欧洲自线| 欧美一级片在线看| 丝袜a∨在线一区二区三区不卡| 99re在线精品| 亚洲欧美中日韩| 国产精品99久久久久久似苏梦涵| 91精品在线观看入口| 亚洲国产成人av| 欧洲精品视频在线观看| 亚洲你懂的在线视频| 91日韩在线专区| 亚洲色图19p| 97精品国产露脸对白| 亚洲国产高清在线观看视频| 国产真实精品久久二三区| 日韩欧美一级在线播放| 日韩和欧美一区二区| 欧美日韩电影在线| 午夜精品国产更新| 在线不卡一区二区| 日本va欧美va瓶| 欧美一区二区不卡视频| 日韩黄色免费电影| 欧美电视剧在线观看完整版| 裸体一区二区三区| 精品国产一区二区亚洲人成毛片 | 成人高清免费观看| 一区二区三区在线观看网站| a在线欧美一区| 亚洲激情图片一区| 欧美视频日韩视频| 伦理电影国产精品| 亚洲精品在线免费观看视频| 国产乱淫av一区二区三区| 中文字幕欧美日本乱码一线二线| 国产69精品久久99不卡| 亚洲欧美一区二区三区久本道91 | 亚洲sss视频在线视频| 欧美一区二区精美| 国产精品99久久久久| 国产精品国产三级国产aⅴ原创| av在线这里只有精品| 亚洲一区在线观看网站| 日韩视频免费观看高清完整版在线观看 | 成人av资源网站| 亚洲伦在线观看| 欧美日韩精品一区二区天天拍小说| 日韩中文字幕不卡| 久久亚洲综合av| 北条麻妃国产九九精品视频| 亚洲成av人**亚洲成av**| www成人在线观看| 日本高清不卡视频| 日本欧美在线观看| 国产精品丝袜黑色高跟|