timebasestruct_t was not declared in this scope

This is a discussion on timebasestruct_t was not declared in this scope within the C++ Programming forums, part of the General Programming Boards category; Hi everyone I am trying to execute a program that uses the C++ timebasestruct_t structure. I am including <sys/time.h> that ...

  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    1

    timebasestruct_t was not declared in this scope

    Hi everyone

    I am trying to execute a program that uses the C++ timebasestruct_t structure.
    I am including <sys/time.h> that should allow me to access this structure. Unfortunately It gives me the follwing meassage when compild with gcc.

    timebasestruct_t was not declared in this scope

    The problem is not that the system does not have <sys/time.h> installed as then it would come up an error message saying can not find header file.

    The code i am trying to compile is as follows

    Code:
    #include <iostream>
    #include <cstdlib>
    #include <time.h>
    #include <sys/time.h>
    #include <sys/types.h>
    
    using namespace std;
    
    int main(int argc, char *argv[])
    {
      timebasestruct_t startTime ;
      cout << "Hello, world!" << endl;
      return EXIT_SUCCESS;
    }
    I am using kdevelop under dedora core 3 linux to run this program.

    Any help would be vastly apreciated.

  2. #2
    Registered User Scribbler's Avatar
    Join Date
    Sep 2004
    Location
    Aurora CO
    Posts
    266
    Hmmm... ya sure you're not thinking of the timeb struct?
    Code:
    #include <sys/timeb.h>
    
    struct timeb startTime ;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. <Gulp>
    By kryptkat in forum Windows Programming
    Replies: 7
    Last Post: 01-14-2006, 12:03 PM
  3. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 08:39 AM
  4. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM
  5. Nested loop frustration
    By caroundw5h in forum C Programming
    Replies: 14
    Last Post: 03-15-2004, 08:45 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21