2010年1月29日星期五

OOP WEEK 3 Challenge....

void bio_putint(int val){
int i;
int x;
int temp[99];
int length;
for (i = 1, length = 0; val / i != 0 ; i *= 10, length++);
for(i = length,x = 0 ; i >0; temp[x]=(val/(10^(i-1))%10+48), i--, x++);
bio_putch(temp);
}

2010年1月27日星期三

Third Week OOP NOTE

Pointer: it alway have the same size
P = &i;
i+= 10\
-same
*p+=10/

ASS(1):there is a new folder create in the trunk called PRJ that have all the code for the assignment 1 (going to be)

Define statment: equal to search and replace before compliation

2010年1月21日星期四

Second Week OOP NOTE

SVN:->
1.Before commit need to everyone confirm.
2.The code in the trunk must in the compliate state.
3.All the command can taget to a specific file.
4.Example for check out in matrix: svn co svn://zenit.senecac.on.ca/oop344
5.only the the file end with .vcproj and code file

C:->
LOOP function:
for(i=0; i<10; i++);{
print("%d", a[i]);
}

for (i=0; i>10; printf("%d",a[i++]));

swith(___){
case V1;
break;
case V2;
break;
case V3;
break;
}

(%u -> unsign integer)

RAM:
it is a template place to store value
&i -> address of i.

2010年1月13日星期三

OOP344 Witer First Week NOTE

SVN://zenit.senecac.on.ca/oop344

CHECK OUT = Get
Commit = Put

OOP NOTE:
i++ ; //integer add one after
++i; //integer add one before

Too main type of variable: Float and Integer
Integer-> Float->
Char:1 Double: Mid
Int:? Float: Low
Short:2 Long double: high
Long:4
Long Long:8

2009年11月1日星期日

OOP Group Assignment

For this group assignment..I need to work on the IO_MenuBar class......

2009年9月17日星期四

This week is the second week in the semester......Hope everything going to be ok!
Derived Classes with Depth
This is contain Constructors and Destructor, Copy Constructor and Assignment Operator.
thought this is not very hard....but I was really confuse when I using it in the first time....

A derived class that accesses resources has depth through one or more of its instance variables. We know that a class that accesses resources requires explicit definitions of its constructor(s), copy constructor, assignment operator and destructor. Without such definitions, the compiler would insert definitions that only duplicate the instance variables, that do not allocate or deallocate memory for the resources accessed, and that do not duplicate the resources referred to by the resource instance variable(s).

A derived class with depth requires explicit definitions of its own constructor(s), copy constructor, assignment operator and destructor. If we define a constructor and assignment operator for a derived class, we need to call the base class counterparts explicitly. In the absence of a call to the base class constructor, the compiler inserts a call to the no-argument constructor. However, the compiler does not insert any call to the base class assignment operator. Note also that the compiler always inserts a call to the base class destructor from the derived class destructor.