Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Sep 18 08:32:46 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m8IFWklc027434 for ; Thu, 18 Sep 2008 08:32:46 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id m8IFYCrW017896 for ; Thu, 18 Sep 2008 08:34:12 -0700 Message-Id: <200809181534.m8IFYCrW017896@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: error getting the current time stamp Date: Thu, 18 Sep 2008 08:34:12 -0700 From: Bill Cheng Someone wrote: > Hi,I 'm getting some error getting the current timestamp. > The error is > > mm2.cpp:20: error: expected constructor, destructor, or type conversion > before '(' token > mm2.cpp:21: error: expected constructor, destructor, or type conversion > before '=' token > *** Error code 1 > make: Fatal error: Command failed for target `mm2.o' > > > > struct timeval t; > gettimeofday(&t, NULL); > start_time=t.tv_sec; > > > i included sys/time.h . > > I dont understand what error it is... Hmm... I just tried this and it worked for me. You probably should come see me during office hour today! -- Bill Cheng // bill.cheng@usc.edu