Difference between revisions of "BTP300 The Only One"

From CDOT Wiki
Jump to: navigation, search
(Created page with '= Assignment #2 = == Repository == === Repo ID === svn://zenit.senecac.on.ca/btp300_113rep?? === Trunk Status === committed by [Simon de Almeida] on 2011-10-12 / being committed…')
 
(Project Status)
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{BTP300 Index | 20113}}
 +
 
= Assignment #2 =
 
= Assignment #2 =
 
== Repository ==
 
== Repository ==
 
=== Repo ID ===
 
=== Repo ID ===
svn://zenit.senecac.on.ca/btp300_113rep??
+
svn://zenit.senecac.on.ca/btp300_113rep10
  
 
=== Trunk Status ===
 
=== Trunk Status ===
Line 9: Line 11:
 
== Team Members ==  
 
== Team Members ==  
 
#[mailto:sdealmeida@learn.senecac.on.ca?subject=btp300 Simon De Almeida]
 
#[mailto:sdealmeida@learn.senecac.on.ca?subject=btp300 Simon De Almeida]
#[mailto:sdealmeida@learn.senecac.on.ca?subject=btp300; eMail All]
+
#[mailto:dgaranin@learn.senecac.on.ca?subject=btp300 Dmitry Garanin]
 +
[mailto:sdealmeida@learn.senecac.on.ca;dgaranin@learn.senecac.on.ca?subject=btp300; eMail All]
  
 
== Project Status ==
 
== Project Status ==
 +
Assignment 1 in Trunk Folder <br />
 +
Assignment 2 Done! <br />
 +
Assignment 3 80% Done
  
 
== Resources ==
 
== Resources ==
Line 19: Line 25:
 
'''1'''. '''Error''':
 
'''1'''. '''Error''':
 
   "cframe.h:15: error: default argument for parameter of type 'CFrame*'" <br />
 
   "cframe.h:15: error: default argument for parameter of type 'CFrame*'" <br />
   '''Fix''': Easy fix, just do a (Cframe*)NULL on the last contructor argument.
+
   '''Fix''': Easy fix, just do a '''(Cframe*)NULL''' on the '''last contructor argument'''.
  
 
'''2.''' '''Error''':
 
'''2.''' '''Error''':
Line 27: Line 33:
 
   a2test.cpp:151: error: no matching function for call to 'CFrame::draw()'
 
   a2test.cpp:151: error: no matching function for call to 'CFrame::draw()'
 
   cframe.h:33: note: candidates are: virtual void CFrame::draw(int) <br />
 
   cframe.h:33: note: candidates are: virtual void CFrame::draw(int) <br />
   '''Fix''': Set draw(int) default value to "C_FULL_FRAME" (Told the prof and he fixed it on the BTP300 page)
+
   '''Fix''': Set '''draw(int)''' default value to "C_FULL_FRAME" (Told the prof and he fixed it on the BTP300 page)
  
 
'''3.''' '''Error''':
 
'''3.''' '''Error''':
Line 34: Line 40:
 
     a2test.cpp:176: error: no matching function for call to 'CFrame::hide()'
 
     a2test.cpp:176: error: no matching function for call to 'CFrame::hide()'
 
     cframe.h:34: note: candidates are: virtual void CFrame::hide(CDirection) <br />
 
     cframe.h:34: note: candidates are: virtual void CFrame::hide(CDirection) <br />
   '''Fix''': Set draw(int) default value to "C_FULL_FRAME" (Told the prof and he fixed it on the BTP300 page)
+
   '''Fix''': Set '''hide(CDirection)''' default value to "C_STATIONARY" (Told the prof and he fixed it on the BTP300 page)
 +
 
 +
'''4.''' '''Error''':
 +
  [[Image:After.png|widthpx| ]]
 +
  <br />
 +
  '''Fix''': This error can be caused in 3 places, either on your hide, capture or draw function ('''CFrame''' class that is)
 +
  Your functions should look like this:
 +
  <br />
 +
  <span style="color:blue">void</span> hide(CDirection frame){
 +
    restore(absrow(), abscol(), height(), width(), (CDirection)frame, _hiddenChars);
 +
    release(('''<span style="color:green">void**</span>''')&_hiddenChars);
 +
  }
 +
  <br />
 +
  <span style="color:blue">void</span> capture(){
 +
    <span style="color:blue">if</span>(!_hiddenChars)
 +
        _hiddenChars = '''<span style="color:green">cio</span>'''::capture(absrow(), abscol(), height(), width());
 +
  }
 +
  <span style="color:blue">void</span> CFrame::draw(int draw){
 +
  <span style="color:blue">//Sureee, just make sure to use
 +
  //SetLine to draw your box and
 +
  //When you're printing your height
 +
  //Use this </span> <br />
 +
  <span style="color:blue">for</span>(i = 1; i < height() - 1; i++){
 +
    <span style="color:blue">//Code Here</span>
 +
  } <br />
 +
  <span style="color:blue">//DON'T FORGET THAT -1 !!!!</span>
 +
  }
 +
'''5.''' '''Error''':
 +
  '''Draw()''' function not working properly and '''<span style="color:green">int</span> CField::display(offset);''' not returning proper value <br />
 +
  '''Fix: <span style="color:blue">C_BORDER_CHARS</span>''' should be '''"/-\\|/-\\<span style="color:red">|</span>"''' instead of '''"/-\\|/-\\"''' (Told Chris and he fixed it)
 +
  '''<span style="color:green">int</span> display(int offset);''' on '''CField''' class should actually be '''<span style="color:red">void</span> display(int offset);''' (Told Chris and he fixed it)

Latest revision as of 13:06, 25 November 2011


BTP300 Fall 2011 | Weekly Schedule | Student List | Project Requirements | Teams and their Projects | Student Resources

Assignment #2

Repository

Repo ID

svn://zenit.senecac.on.ca/btp300_113rep10

Trunk Status

committed by [Simon de Almeida] on 2011-10-12 / being committed by [no one]

Team Members

  1. Simon De Almeida
  2. Dmitry Garanin

eMail All

Project Status

Assignment 1 in Trunk Folder
Assignment 2 Done!
Assignment 3 80% Done

Resources

Bug Fixes

1. Error:

 "cframe.h:15: error: default argument for parameter of type 'CFrame*'" 
Fix: Easy fix, just do a (Cframe*)NULL on the last contructor argument.

2. Error:

 a2test.cpp: In function 'void testFrame()':
 a2test.cpp:150: error: no matching function for call to 'CFrame::draw()'
 cframe.h:33: note: candidates are: virtual void CFrame::draw(int)
 a2test.cpp:151: error: no matching function for call to 'CFrame::draw()'
 cframe.h:33: note: candidates are: virtual void CFrame::draw(int) 
Fix: Set draw(int) default value to "C_FULL_FRAME" (Told the prof and he fixed it on the BTP300 page)

3. Error:

 a2test.cpp:175: error: no matching function for call to 'CFrame::hide()'
    cframe.h:34: note: candidates are: virtual void CFrame::hide(CDirection)
    a2test.cpp:176: error: no matching function for call to 'CFrame::hide()'
    cframe.h:34: note: candidates are: virtual void CFrame::hide(CDirection) 
Fix: Set hide(CDirection) default value to "C_STATIONARY" (Told the prof and he fixed it on the BTP300 page)

4. Error:

 After.png
 
Fix: This error can be caused in 3 places, either on your hide, capture or draw function (CFrame class that is) Your functions should look like this:
void hide(CDirection frame){ restore(absrow(), abscol(), height(), width(), (CDirection)frame, _hiddenChars); release((void**)&_hiddenChars); }
void capture(){ if(!_hiddenChars) _hiddenChars = cio::capture(absrow(), abscol(), height(), width()); } void CFrame::draw(int draw){ //Sureee, just make sure to use //SetLine to draw your box and //When you're printing your height //Use this
for(i = 1; i < height() - 1; i++){ //Code Here }
//DON'T FORGET THAT -1 !!!! }

5. Error:

  Draw() function not working properly and int CField::display(offset); not returning proper value 
Fix: C_BORDER_CHARS should be "/-\\|/-\\|" instead of "/-\\|/-\\" (Told Chris and he fixed it) int display(int offset); on CField class should actually be void display(int offset); (Told Chris and he fixed it)