Click here to Skip to main content
15,921,113 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to get variable type Pin
David Crow19-May-04 4:04
David Crow19-May-04 4:04 
Generaldrawing while clicking Pin
kfaday18-May-04 14:27
kfaday18-May-04 14:27 
GeneralRe: drawing while clicking Pin
Christian Graus18-May-04 18:30
protectorChristian Graus18-May-04 18:30 
GeneralRe: drawing while clicking Pin
kfaday19-May-04 3:06
kfaday19-May-04 3:06 
GeneralRe: drawing while clicking Pin
Christian Graus19-May-04 11:38
protectorChristian Graus19-May-04 11:38 
GeneralRe: drawing while clicking Pin
kfaday19-May-04 14:41
kfaday19-May-04 14:41 
GeneralNEW AT FUNCTIONS, PLEASE HELP, URGETNT Pin
ashrafak18-May-04 13:07
ashrafak18-May-04 13:07 
GeneralRe: NEW AT FUNCTIONS, PLEASE HELP, URGETNT Pin
Pablo Hernandez Valdes18-May-04 15:03
Pablo Hernandez Valdes18-May-04 15:03 
The problem is that the int C++ type is used, and it isn't a struct/class. You should use the System::Int32 type if you want to use the .ToString method.Smile | :)

#include "stdafx.h"<br />
#using <mscorlib.dll><br />
using namespace System;<br />
<br />
System::Int32 D,DD,MM,YY;<br />
void separateDate(System::Int32 *temp,System::Int32 *DD,System::Int32 *MM,System::Int32 *YY)<br />
{<br />
	*DD=*temp/10000;<br />
	*MM=(*temp%10000)/100;<br />
	*YY=(*temp%10000)%100;<br />
	do<br />
	{ <br />
		Console::WriteLine(S"\nEnter a Valid Date: ");<br />
	}<br />
	while (*DD<1 || *DD>31);<br />
	do<br />
	{<br />
		Console::WriteLine(S"\nEnter a Valid Date: ");<br />
	}<br />
	while (*MM<1 || *MM>12);<br />
<br />
	if (*YY<=36)<br />
	{<br />
		Console::WriteLine(S"\nTHE DATE IS: {0}/{1}/20{2}",(*DD).ToString(),(*MM).ToString(),(*YY).ToString());<br />
	}<br />
	else<br />
	if (*YY>36)<br />
	{<br />
		Console::WriteLine(S"\nTHE DATE IS: {0}/{1}/19{2}",(*DD).ToString(),(*MM).ToString(),(*YY).ToString());<br />
	}<br />
}<br />
int _tmain()<br />
{ <br />
	Console::WriteLine(S"*******************************************************************");<br />
	Console::WriteLine(S"\t\tDATE FORMAT");<br />
	Console::WriteLine(S"*******************************************************************");<br />
<br />
	void separateDate(System::Int32 *temp, System::Int32 *DD, System::Int32 *MM, System::Int32 *YY);<br />
	Console::Write(S"\nENTER THE DATE (SIX DIGIT POSITIVE INTEGER): ");<br />
	D=D.Parse(Console::ReadLine());<br />
	separateDate(&D,&DD,&MM,&YY);<br />
<br />
	Console::ReadLine();<br />
	return 0;<br />
}


Pablo Hernandez Valdes
GeneralRe: NEW AT FUNCTIONS, PLEASE HELP, URGETNT Pin
Christian Graus18-May-04 18:31
protectorChristian Graus18-May-04 18:31 
GeneralOverloading operator== in derived classes Pin
Wheatbread18-May-04 11:55
Wheatbread18-May-04 11:55 
GeneralRe: Overloading operator== in derived classes Pin
kfaday18-May-04 15:19
kfaday18-May-04 15:19 
GeneralRe: Overloading operator== in derived classes Pin
Wheatbread19-May-04 4:50
Wheatbread19-May-04 4:50 
QuestionWhere AM I ? Pin
john john mackey18-May-04 11:52
john john mackey18-May-04 11:52 
AnswerRe: Where AM I ? Pin
Garth J Lancaster18-May-04 12:05
professionalGarth J Lancaster18-May-04 12:05 
GeneralRe: Where AM I ? Pin
vcplusplus18-May-04 12:23
vcplusplus18-May-04 12:23 
GeneralRe: Where AM I ? Pin
Garth J Lancaster18-May-04 12:29
professionalGarth J Lancaster18-May-04 12:29 
GeneralRe: Where AM I ? Pin
john john mackey18-May-04 13:17
john john mackey18-May-04 13:17 
QuestionExceptions after building for Release, but building for Debug mode is OK? Pin
jerry1211a18-May-04 11:12
jerry1211a18-May-04 11:12 
AnswerRe: Exceptions after building for Release, but building for Debug mode is OK? Pin
Marcus Spitzmiller18-May-04 12:53
Marcus Spitzmiller18-May-04 12:53 
GeneralRe: Exceptions after building for Release, but building for Debug mode is OK? Pin
jerry1211a18-May-04 14:27
jerry1211a18-May-04 14:27 
GeneralRe: Exceptions after building for Release, but building for Debug mode is OK? Pin
Marcus Spitzmiller19-May-04 4:43
Marcus Spitzmiller19-May-04 4:43 
AnswerRe: Exceptions after building for Release, but building for Debug mode is OK? Pin
David Crow19-May-04 4:11
David Crow19-May-04 4:11 
GeneralSplitter with a Form and a Document Pin
Charlie Curtis18-May-04 10:03
Charlie Curtis18-May-04 10:03 
QuestionCan anyone help me understand this code better? Pin
BrockVnm18-May-04 9:57
BrockVnm18-May-04 9:57 
AnswerRe: Can anyone help me understand this code better? Pin
Christian Graus18-May-04 11:29
protectorChristian Graus18-May-04 11:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.