Date program starts DOS's date

This is a discussion on Date program starts DOS's date within the C++ Programming forums, part of the General Programming Boards category; I wrote a program (originally a exercise fro m a book) that allows the user to enter a date like ...

Date program starts DOS's date

I wrote a program (originally a exercise fro m a book) that allows the user to enter a date like mm/dd/yy and then displays it. When i compile and run it (i'm using DOS (standard) application) it runs DOS's date program (allows you to change the date on your system) when my program is totally different!

i figured out why this happened. my projects name was date, and when i changed the name it ran MY program. So why would it run DOS's date program just because the name is the same?

But even though everything was the same when i ran my program, and dos's program, there was a slight difference. The dos's date program asks for the date in this format: dd-mm-yy and my program asks for it in mm-dd-yy. ??

While you're breakin' down my back n'
I been rackin' out my brain
It don't matter how we make it
'Cause it always ends the same
You can push it for more mileage
But your flaps r' wearin' thin
And I could sleep on it 'til mornin'
But this nightmare never ends
Don't forget to call my lawyers
With ridiculous demands
An you can take the pity so far
But it's more than I can stand
'Cause this couchtrip's gettin' older
Tell me how long has it been
'Cause 5 years is forever
An you haven't grown up yet
-- You Could Be Mine - Guns N' Roses