Time and date functions in C++

Looking for a list of functions and description

Page 1 of 1

3 Replies - 15789 Views - Last Post: 11 March 2008 - 10:21 AM Rate Topic: -----

#1 johnfravolda  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 10-March 08

Time and date functions in C++

Post icon  Posted 10 March 2008 - 02:47 PM

Hi there! I am just getting started in this language and will certainly be guilty of some groaners here.

I would like to if dreamincode has a list of C++ functions and descriptions somewhere. At this juncture, I am interested in time and date functions in particular.

The task I am attempting is to write some code for what I believe is a C++ derived language for a "trading platform".

The platform (ODL Securities "MetaTrader") provides a code editor (MetaEditor) and some ready made scripts that can be modified for my purposes.

The first thing I want to do is to get a trade to initiate at a given point in time.

After poking around a bit and letting the editor suggest functions it seems to me I am looking for something along these lines. As I said, I am new to this and am very greatful for pointing out errors in syntax, etc.

int start()
  {
bool tradehappened=false
int initiationtime
int DOW
int TOD
DOW = DayOfWeek
TOD = TimeDay

   if(Time > initiationtime)
	  {
	   return(1);
	   tradehappened=true
	  }
  }



Is This A Good Question/Topic? 0
  • +

Replies To: Time and date functions in C++

#2 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2250
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: Time and date functions in C++

Posted 10 March 2008 - 06:42 PM

Well, you can start with the DreamInCode C++ Reference Sheet.

You can hang out at cplusplus.com.

But to be honest, we have come to the consensus that you really should pick yourself up a book. There are many good one (on the FAQ you can find several threads where we talks about pro-cons of various books.)
Was This Post Helpful? 0
  • +
  • -

#3 jhedz  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 11-March 08

Re: Time and date functions in C++

Posted 11 March 2008 - 07:10 AM

use #include<ctime>//library for time and date
Was This Post Helpful? 0
  • +
  • -

#4 johnfravolda  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 10-March 08

Re: Time and date functions in C++

Posted 11 March 2008 - 10:21 AM

Thanks for the advise and I will check out the book recomendations!

View PostNickDMax, on 10 Mar, 2008 - 06:42 PM, said:

Well, you can start with the DreamInCode C++ Reference Sheet.

You can hang out at cplusplus.com.

But to be honest, we have come to the consensus that you really should pick yourself up a book. There are many good one (on the FAQ you can find several threads where we talks about pro-cons of various books.)



Thanks! a bit cryptic, but it seems relevant.

View Postjhedz, on 11 Mar, 2008 - 07:10 AM, said:

use #include<ctime>//library for time and date

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1