Is "timeout" always equals to zero?

here it follows…

 if ((millis()-start)>timeout) st = true;

}

//-------------------------------------------------------------------------------------------------------------------------
// 2)
//-------------------------------------------------------------------------------------------------------------------------
start = millis();

while ((crossCount < crossings) && ((millis()-start)<timeout))

I see that " timeout" is declared in EmonLib.h, but isn’t assigned any value for it, so in these lines of code 'timeout" is always equals to zero?

It is assigned a value, but not there. For example, look in emonTxV3_4_RFM12B_DiscreteSampling_433MHz.ino and you will see:

const int timeout = 2000; //emonLib timeout

For beginners learning the C & C++ languages, I recommend the book “Kernigan & Ritchie” http://www.amazon.co.uk/C-Programming-Language-2nd/dp/0131103628/ref=sr_1_3?s=books&ie=UTF8&qid=1292502807&sr=1-3. This is the standard text book.

The normal place I point people at who want to move up to C++ is http://www.relisoft.com/book/index.htm and that assumes you know C.

Because the Arduino environment normally uses a very small subset of the language, neither are the best place for a beginner to start, nor are many of the other on-line tutorials. I’d still suggest you have both of those available for reference.

However, there is this: Home | Mechanical Engineering | College of Science and Engineering which does look to be a good starting place for a beginner. It does not go as far as classes and methods that are used here, though. For that, you need the Relisoft course.