Open main menu

CDOT Wiki β

Changes

Team 5 Bugs Report

111 bytes removed, 22:14, 28 September 2013
* == Week 4-5 Log (Sept. 25/13):
== * == Week 4-5 Log Bug Report (Sept. Tai Nguyen/25/1309/2013): == 
- display function completed, no bugs found
- edit function problem
  == Bug log == - objective'''Objective: move cursor left and right with arrow keys (LEFT, RIGHT)''' '''Issue: when typing, cannot insert correct values and cannot use left and right keys''''''Solution: Using arrays to store the current positions causes issues with the console input.. not sure why.. but when removed array - currPos and used normal variable int to store the row and column current position it worked...'''
code attempt:
 
do{
 
console.getPosition(currPos[0], currPos[1]); //currPos[0] - rows
 
console >> key;
 
do{
console.getPosition(currPos[0], currPos[1]);
console >> key;
 
if(key >= ' ' && key <= '~'){
console << key;
}
}while(key != ESCAPE);
issue: when typing, cannot insert correct values and cannot use left and right keys
 
However if re-written as, it performs as desired:
do{
}
}while(key != ESCAPE);
 
SOLVED BUG: using arrays to store the current positions causes issues with the console input.. not sure why.. but when removed array - currPos and used normal variable int to store the row and column current position it worked...
47
edits