Click here to Skip to main content
15,900,461 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to get variable type Pin
Anthony_Yio18-May-04 22:20
Anthony_Yio18-May-04 22:20 
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 
THE QUESTION REQUIRES US TO DESIGN A FUNCTION AS MENTIONED BELOW, AND EVERYTIME I DEBUG THE PROGRAM, IT GIVES ME ONLY ONE ERROR WHICH IS MENTIONED RIGHT AT TEH BOTTOM OF THE PAGE.

//Purpose::TO CONVERT A GIVEN SIX DIGIT INTEGER TO DATE FORMAT (dd/mm/yyyy)AND CHECK Y2K COMPLIANCE

#include "stdafx.h"
#using <mscorlib.dll>
using namespace System;

int D,DD,MM,YY;

void separateDate(int *temp,int *DD,int *MM,int *YY)
{
*DD=*temp/10000;
*MM=(*temp%10000)/100;
*YY=(*temp%10000)%100;

do
{
Console::WriteLine(S"\nEnter a Valid Date: ");
}
while (*DD<1 || *DD>31);
do
{
Console::WriteLine(S"\nEnter a Valid Date: ");
}
while (*MM<1 || *MM>12);

if (*YY<=36)
{
Console::WriteLine(S"\nTHE DATE IS: {0}/{1}/20{2}",*DD.ToString(),*MM.ToString(),*YY.ToString()); //h:\Visual Studio Projects\Y2k\Y2K.cpp(28): error C2228: left of '.ToString' must have class/struct/union type

}
else
if (*YY>36)
{
Console::WriteLine(S"\nTHE DATE IS: {0}/{1}/19{2}",*DD.ToString(),*MM.ToString(),*YY.ToString()); //h:\Visual Studio Projects\Y2k\Y2K.cpp(28): error C2228: left of '.ToString' must have class/struct/union type

}
}
int _tmain()
{
Console::WriteLine(S"*******************************************************************");
Console::WriteLine(S"\t\tDATE FORMAT");
Console::WriteLine(S"*******************************************************************");

void separateDate(int *temp, int *DD, int *MM, int *YY);
Console::Write(S"\nENTER THE DATE (SIX DIGIT POSITIVE INTEGER): ");
D=D.Parse(Console::ReadLine());
separateDate(&D,&DD,&MM,&YY);

Console::ReadLine();
return 0;
}



//h:\Visual Studio Projects\Y2k\Y2K.cpp(28): error C2228: left of '.ToString' must have class/struct/union type

I HAVE ALSO MENTIONED THE ERROR IN THE LINES IT OCCURS, PLEASE HELP, AM IN A TIGHT SPOT!! THANKS
GeneralRe: NEW AT FUNCTIONS, PLEASE HELP, URGETNT Pin
Pablo Hernandez Valdes18-May-04 15:03
Pablo Hernandez Valdes18-May-04 15:03 
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 

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.