Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
A

ashrafak

@ashrafak
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • NEW AT FUNCTIONS, PLEASE HELP, URGETNT
    A ashrafak

    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 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

    C / C++ / MFC help csharp c++ visual-studio design
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups