13:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.130 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 13:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.1313:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.13

.

.

Wednesday, February 9, 2011

C++ Date Library by Ethan Castanon - in progress

#ifndef Date_H
#define Date_H

namespace DateSpace
{
class Date
{
public:
Date();
Date(int = 1, int = 1, int = 1900);
int getDay(){ return Day;}
int getMonth(){ return Month; }
int getYear(){ return Year; }
void setDay(int Day);
void setMonth(int Month);
void setYear(int Year);

private:
int Day;
int Month;
int Year;

};

bool IsValidDate(int Day, int Month, int Year);

bool IsLeapYear(int Year);

}



#endif

===================================================


// File: Date.cpp; Name: Ethan Castanon
#include "Date.h"


namespace DateSpace
{
bool isLeapYear(int Year)
{
bool Leap;
if ((Year % 100 == 0) && (Year % 400 == 0))
Leap = 1;
else
if ((Year % 100 != 0) && (Year % 4 == 0))
Leap = 1;
else
Leap = 0;
return Leap;
}
bool isValidDate(int Day, int Month, int Year)
{
bool isVal;
isVal = 1;
return isVal;
}
void Date::setDay(int theDay)
{
isValudDate;
Day = theDay;
}
void Date::setMonth(int theMonth)
{
Month = theMonth;
}
void Date::setYear(int theYear)
{
Year = theYear;
}
}

===================================================


#include <iostream>
#include "Date.h"

using namespace std;
using namespace DateSpace;

int main()
{

}