Help with ignore related coding

OMG...please help!

  • (2 Pages)
  • +
  • 1
  • 2

17 Replies - 658 Views - Last Post: 16 December 2009 - 06:16 AM Rate Topic: -----

#1 froggy88  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 14-September 09

Help with ignore related coding

Post icon  Posted 15 December 2009 - 05:01 PM

I'm working on a horoscope project in C++
okay...i have them entering a date:
cout << "Enter month of birth (first three letters): ";
	cin >> month;
	cout << "Enter day of birth: " << endl;
	cin >> day;
	cout << "Enter year of birth: " << endl;
	cin >> year;



I want it to show up as MM/DD/YY instead of MM/DD/YYYY without having to make them enter it in as YY. Basicly converting YYYY to YY. If anyone understands what I'm asking and can help, please do.

Is This A Good Question/Topic? 0
  • +

Replies To: Help with ignore related coding

#2 jjl  Icon User is offline

  • Engineer
  • member icon

Reputation: 1086
  • View blog
  • Posts: 4,562
  • Joined: 09-June 09

Re: Help with ignore related coding

Posted 15 December 2009 - 05:10 PM

string date = "1990";
date = date.substr(2,4);


This post has been edited by ImaSexy: 15 December 2009 - 05:10 PM

Was This Post Helpful? 0
  • +
  • -

#3 janotte  Icon User is offline

  • code > sword
  • member icon

Reputation: 990
  • View blog
  • Posts: 5,141
  • Joined: 28-September 06

Re: Help with ignore related coding

Posted 15 December 2009 - 05:10 PM

What data type (int, string, etc) are you declaring "year" as?

I don't want to just wildly guess at a possible answer without knowing what program design you are using (not that it stops some, it seems).

This post has been edited by janotte: 15 December 2009 - 05:11 PM

Was This Post Helpful? 0
  • +
  • -

#4 srlester  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 53
  • Joined: 28-January 09

Re: Help with ignore related coding

Posted 15 December 2009 - 05:53 PM

yyyy - 1900
For example If I typed 1992 for yyyy it would 92.
I think thats what you mean
Was This Post Helpful? 0
  • +
  • -

#5 janotte  Icon User is offline

  • code > sword
  • member icon

Reputation: 990
  • View blog
  • Posts: 5,141
  • Joined: 28-September 06

Re: Help with ignore related coding

Posted 15 December 2009 - 06:02 PM

View Postsrlester, on 15 Dec, 2009 - 04:53 PM, said:

yyyy - 1900
For example If I typed 1992 for yyyy it would 92.
I think thats what you mean


Nope.
Read my posting again.
You aren't even close to answering what I was asking.
Look at the first line.
The answer I am seeking is a data type (e.g. int, double, string, <whatever>)

If you don't know what a data type is then read here
http://www.cplusplus...rial/variables/
Was This Post Helpful? 0
  • +
  • -

#6 srlester  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 53
  • Joined: 28-January 09

Re: Help with ignore related coding

Posted 15 December 2009 - 06:49 PM

Lol

This post has been edited by srlester: 15 December 2009 - 07:42 PM

Was This Post Helpful? 0
  • +
  • -

#7 Ancient Dragon  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 81
  • View blog
  • Posts: 679
  • Joined: 19-July 09

Re: Help with ignore related coding

Posted 15 December 2009 - 07:11 PM

View Postsrlester, on 15 Dec, 2009 - 05:49 PM, said:

For one I know what a data type is and I'm Pretty offended at that.

You shouldn't be offended -- afterall we don't know how much you know.

Quote

And for two I don't know how you expect anyone to know what you are talking about. .

The question seemed pretty clear to me. Maybe you should re-read the question and ponder it for awhile.
Was This Post Helpful? 0
  • +
  • -

#8 janotte  Icon User is offline

  • code > sword
  • member icon

Reputation: 990
  • View blog
  • Posts: 5,141
  • Joined: 28-September 06

Re: Help with ignore related coding

Posted 15 December 2009 - 07:23 PM

View Postsrlester, on 15 Dec, 2009 - 05:49 PM, said:

For one I know what a data type is and I'm Pretty offended at that.

Sorry.
When you didn't give a data type as part of what I thought was an answer to my question I thought I might be using a term that you weren't familiar with. I thought perhaps you use a different name (like some people use "function" and some people use "method" for the same thing. No offence was intended (but hilarious that you thought throwing your toys out of the pram was a valid response).

How would a stranger on the interwebs know what you do and don't know? If you are going to spend time being offended by such things you'll waste a lot of your life doing so. (And I very much doubt you are pretty, except in the eyes of your mother.)

If you are going to play with the big boys and throw aggression around you are going to need to get tougher and/or smarter.

If you think it is OK to attack the OP for writing a bad question then you had best expect to get some rough treatment as well when you post stuff that is simply restating what the OP has already said but in a less clear form. How does that help?

Not that I intended my earlier posting to be a harsh response. I misunderstood what you were saying and answered in good humour. Now I see that you were talking to the OP, and not me, I can see that my response was a mistake (brought on, only in part, by your lack of clarity) for which I apologise.

But now that you are carrying on the way you are then it's time for you to realise that more than one can play at the game of throwing mud about and you might find others are better at it than you. Be prepared because he who lives by the sword dies by the sword.
Was This Post Helpful? 0
  • +
  • -

#9 srlester  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 53
  • Joined: 28-January 09

Re: Help with ignore related coding

Posted 15 December 2009 - 07:50 PM

View Postjanotte, on 15 Dec, 2009 - 06:23 PM, said:

View Postsrlester, on 15 Dec, 2009 - 05:49 PM, said:

For one I know what a data type is and I'm Pretty offended at that.

Sorry.
When you didn't give a data type as part of what I thought was an answer to my question I thought I might be using a term that you weren't familiar with. I thought perhaps you use a different name (like some people use "function" and some people use "method" for the same thing. No offence was intended (but hilarious that you thought throwing your toys out of the pram was a valid response).

How would a stranger on the interwebs know what you do and don't know? If you are going to spend time being offended by such things you'll waste a lot of your life doing so. (And I very much doubt you are pretty, except in the eyes of your mother.)

If you are going to play with the big boys and throw aggression around you are going to need to get tougher and/or smarter.

If you think it is OK to attack the OP for writing a bad question then you had best expect to get some rough treatment as well when you post stuff that is simply restating what the OP has already said but in a less clear form. How does that help?

Not that I intended my earlier posting to be a harsh response. I misunderstood what you were saying and answered in good humour. Now I see that you were talking to the OP, and not me, I can see that my response was a mistake (brought on, only in part, by your lack of clarity) for which I apologise.

But now that you are carrying on the way you are then it's time for you to realise that more than one can play at the game of throwing mud about and you might find others are better at it than you. Be prepared because he who lives by the sword dies by the sword.

I will apologize for being a little rude. I wasn't in a great mood. But I don't know how you are going to try to say you doubt I'm pretty I assume you are trying to call me a geek but you failed to realize that I didn't write two paragrapghs trying to offend someone then end it with a quote. Lmao I'm not worried about it. However if you think you want to throw mud at me for no real reason then I'm not the one who needs to get smarter.
Was This Post Helpful? 0
  • +
  • -

#10 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5363
  • View blog
  • Posts: 27,325
  • Joined: 10-May 07

Re: Help with ignore related coding

Posted 15 December 2009 - 07:59 PM

srlester : If you are not going to with the topic, then please don't post.
Was This Post Helpful? 0
  • +
  • -

#11 iamvern  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 15-December 09

Re: Help with ignore related coding

Posted 15 December 2009 - 07:59 PM

View Postjanotte, on 15 Dec, 2009 - 06:23 PM, said:

View Postsrlester, on 15 Dec, 2009 - 05:49 PM, said:

For one I know what a data type is and I'm Pretty offended at that.

Sorry.
When you didn't give a data type as part of what I thought was an answer to my question I thought I might be using a term that you weren't familiar with. I thought perhaps you use a different name (like some people use "function" and some people use "method" for the same thing. No offence was intended (but hilarious that you thought throwing your toys out of the pram was a valid response).

How would a stranger on the interwebs know what you do and don't know? If you are going to spend time being offended by such things you'll waste a lot of your life doing so. (And I very much doubt you are pretty, except in the eyes of your mother.)

If you are going to play with the big boys and throw aggression around you are going to need to get tougher and/or smarter.

If you think it is OK to attack the OP for writing a bad question then you had best expect to get some rough treatment as well when you post stuff that is simply restating what the OP has already said but in a less clear form. How does that help?

Not that I intended my earlier posting to be a harsh response. I misunderstood what you were saying and answered in good humour. Now I see that you were talking to the OP, and not me, I can see that my response was a mistake (brought on, only in part, by your lack of clarity) for which I apologise.

But now that you are carrying on the way you are then it's time for you to realise that more than one can play at the game of throwing mud about and you might find others are better at it than you. Be prepared because he who lives by the sword dies by the sword.


Well, before i'd tell someone to "get tougher and/or smarter" i'd learn how to spell, "apologize".


Just saying. :)
Was This Post Helpful? 0
  • +
  • -

#12 jjl  Icon User is offline

  • Engineer
  • member icon

Reputation: 1086
  • View blog
  • Posts: 4,562
  • Joined: 09-June 09

Re: Help with ignore related coding

Posted 15 December 2009 - 08:21 PM

Lets all assume its a string and be friends :)
Was This Post Helpful? 0
  • +
  • -

#13 srlester  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 53
  • Joined: 28-January 09

Re: Help with ignore related coding

Posted 15 December 2009 - 08:27 PM

Amen.
I was thinking that's what it probably was, but I don't think he's replied to any of this lol it's just been us flaming.
Was This Post Helpful? 0
  • +
  • -

#14 janotte  Icon User is offline

  • code > sword
  • member icon

Reputation: 990
  • View blog
  • Posts: 5,141
  • Joined: 28-September 06

Re: Help with ignore related coding

Posted 15 December 2009 - 08:33 PM

froggy88
While it is not in my power to say this I suspect that the moderators would not be unhappy if you treated your thread as officially "hijacked" and not chastise you if you started a new thread for your question and allow this one to slide into the ignominious obscurity it deserves.

-----------------

View Postiamvern, on 15 Dec, 2009 - 06:59 PM, said:

Well, before i'd tell someone to "get tougher and/or smarter" i'd learn how to spell, "apologize".
Just saying. :)


Check the flag in my profile. As much as it may be a shock to some, the spelling of English varies around the world. North American spelling is not the world's spelling. No spelling system is better, just different to the others.

You'll need to learn what "localise / localize" means if you intend to be a programmer otherwise you'll run the risk of looking like an uniformed, parochial, peasant.
Just saying :D
Was This Post Helpful? 0
  • +
  • -

#15 srlester  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 53
  • Joined: 28-January 09

Re: Help with ignore related coding

Posted 15 December 2009 - 08:53 PM

froggy88 If you are checking on this, I dont think you need to start a new thread. Can you tell us what is the data type you are using for the year. Or let us see what code you have.

And Janotte That was one more unneeded reply. Im not going to do this anymore. Lol there is no point, let it die.

But yeah froggy. I think you could get more help if you showed us what all you've came up with...unless thats it then just tell us what ideas you have for the data type because since you're new here I dont want you to get the wrong idea we do want to help =). Just give us an update.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2