Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

CPP

Name: Anonymous 2011-11-27 10:04

Hi,

is it a good practice to write this #def in cpp?

#define print(X) std::cout<<X<<std::endl

so that it can be used as:

print("what " << "ever" << " I " << "want");

btw.. how do I insert sniplet of code here?

Name: Anonymous 2011-11-27 11:09

Awww, too hard for the little baby...

timespec start, end;
double seconds;
clock_gettime(CLOCK_CLOCK_THREAD_CPUTIME_ID, &start);
// do shit
clock_gettime(CLOCK_CLOCK_THREAD_CPUTIME_ID, &end);
seconds = (end.tv_sec - start.tv_sec) + (end.tv_nsec - start.tv_nsec) / 1000000000.0;

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List