I'm having trouble using '?' in conjunction with ','
Perhaps I'm going about it the wrong way.
Code:const unsigned long long int stopwatch::read() //if rng, read() will give a current reading, if !rng, it'll return curr. { return rng ? /*34*/ (struct timeval now, gettimeofday(&now,0), timeval & beg = ((timeval*)data)[0], now.tv_sec*100000LL+now.tv_usec) - (beg.tv_sec*100000LL+beg.tv_usec)) : /*39*/ curr; }Thanks.Code:stopwatch_linux.cpp: In member function ‘const long long unsigned int stopwatch::read()’: 34: error: expected primary-expression before ‘struct’ 34: error: expected `)' before ‘struct’ 39: error: expected `:' before ‘;’ token 39: error: expected primary-expression before ‘;’ token



LinkBack URL
About LinkBacks



