?? http:^^www.cs.wisc.edu^~cs564-1^course_info^assigns^assign1^faq.html
字號:
Date: Tue, 05 Nov 1996 20:54:53 GMTServer: NCSA/1.5Content-type: text/htmlLast-modified: Mon, 11 Sep 1995 19:41:30 GMTContent-length: 1767<html><head> <title>Assignment 1: FAQ</title></head><body><h1>Assignment 1: FAQ (and answers)</h1><hr><h2>FAQs</h2><ul><li> <!WA0><a href="#bin-files">"How do I create binary data files?"</a><li> <!WA1><a href="#const-mem"> "How do I initialize the <em>const</em> data members of my objects?" </a><li> <!WA2><a href="#scope"> "How do I pass the INT/STR argument to the RecSpec constructor?" </a></ul><hr><a name="bin-files"><h3><!WA3><img src="http://www.cs.wisc.edu/~cs564-1/pics/ball-green.gif"> "How do I create binary data files?"</h3></a>Sample ascii data files and an ascii->binary data file converterare provided in /u/course/cs564/assigns/assign1/data.Use this to create your own binary data files for testing.(Look at README in that directory for more info)<p><a name="const-mem"><h3><!WA4><img src="http://www.cs.wisc.edu/~cs564-1/pics/ball-green.gif"> "How do I initialize the <em>const</em> data members of my objects?"</h3></a>Here is an example:<pre>class PinkFloyd {public: PinkFloyd(int the_world) : they_rule(the_world) {}private: const int they_rule;};</pre>For more info, lookup "constant data members" in your favorite C++ book!<a name="scope"><h3><!WA5><img src="http://www.cs.wisc.edu/~cs564-1/pics/ball-green.gif"> "How do I pass the INT/STR argument to the RecSpec constructor?"</h3></a>Field_type is defined within the scope of RecSpec.If you are outside this scope, you must specify to C++ that you wantthe field_type in the RecSpec scope (ie, RecSpec::INT, not INT).Lookup the scope operator (::) in your least disliked C++ book formore info.<a name="solution"><H3><!WA6><img src="http://www.cs.wisc.edu/~cs564-1/pics/ball-green.gif">"Where is the solution?"</H3><PRE>~cs564-1/assigns/assign1/sample/</PRE><P>(Note, the current TAs did not write the solution.)</body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -