Monday, May 31, 2010

The question in Class

Q: do not use ? and if to print a[10]={o,3,5,3,5,8,9,6,5,10} which is greater than 3 in one line.
for(int i=0, i<10, i++)
a[i] >3 && printf("%d \n", a[i]);

lazy evaluation

C++ uses short circuit evaluation, if the whole conditions's result is known, the compiler do not waste to check the rest. Like
if(b<2 && (a=a+1)) printf("X\n"); never print, because a=a+1 never happen. So the compiler does not waste time to check the rest.

How To Log IRC Conversations on mIRC

To log conversations on mIRC, you need to :

  1. Right click on the channel on the Switchbar (The bar with the channel names on it)
  2. Select Logging
  3. Select On

To view a logged conversation:

  1. Click on Tools
  2. Click on Log Files...
  3. Find you log file and double click