Click here to Skip to main content
15,915,093 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: running C++ trouble Pin
pete014-Mar-06 3:50
pete014-Mar-06 3:50 
i am very sorry.

there is no error on the program at the moment but what it supposed to do is take input from users enter dates for example if you run it, the output is
12/12/2003 but i want it to accept more than one date for example
12/01/2003
13/12/2003
14/03/2003 and so on.
This is the actual code
<br />
#include "stdafx.h"<br />
<br />
#using <mscorlib.dll><br />
using namespace std;<br />
<br />
class Day{<br />
   private:<br />
       int day,month,year;//Date<br />
      <br />
   public:<br />
       Day(int,int,int);//Constructor<br />
       ~Day();//Destructor<br />
      <br />
       void display();<br />
};<br />
<br />
Day::Day(int d,int m,int y){//Pass date to constructor<br />
   day=d;month=m;year=y;//Set the date<br />
   <br />
}<br />
<br />
Day::~Day(){}<br />
<br />
<br />
void Day::display(){<br />
   std::cout<<day<<'/'<<month<<'/'<<year<<std::endl;//Display day<br />
  <br />
}<br />
<br />
int main(){<br />
   int d,m,y;<br />
   std::cout<<"Please Input the date :\n";<br />
   std::cin>>d>>m>>y;<br />
   Day MyDay(d,m,y);//Create a day<br />
      <br />
   MyDay.display();<br />
   <br />
}

GeneralRe: running C++ trouble Pin
Cedric Moonen14-Mar-06 3:54
Cedric Moonen14-Mar-06 3:54 
QuestionRe: running C++ trouble Pin
pete014-Mar-06 4:01
pete014-Mar-06 4:01 
QuestionRe: running C++ trouble Pin
pete014-Mar-06 3:56
pete014-Mar-06 3:56 
AnswerRe: running C++ trouble Pin
2bee 14-Mar-06 5:11
2bee 14-Mar-06 5:11 
AnswerRe: running C++ trouble Pin
Saksida Bojan14-Mar-06 19:02
Saksida Bojan14-Mar-06 19:02 
QuestionHow to build 2 projects using "devenv.exe" with different project directory settings Pin
Rafferty Uy13-Mar-06 13:18
Rafferty Uy13-Mar-06 13:18 
AnswerRe: How to build 2 projects using "devenv.exe" with different project directory settings Pin
Rafferty Uy14-Mar-06 14:52
Rafferty Uy14-Mar-06 14:52 
GeneralRe: How to build 2 projects using "devenv.exe" with different project directory settings Pin
Saksida Bojan14-Mar-06 18:57
Saksida Bojan14-Mar-06 18:57 
QuestionError Message Pin
John L. DeVito13-Mar-06 10:28
professionalJohn L. DeVito13-Mar-06 10:28 
AnswerRe: Error Message Pin
George L. Jackson13-Mar-06 10:40
George L. Jackson13-Mar-06 10:40 
GeneralRe: Error Message Pin
John L. DeVito13-Mar-06 10:43
professionalJohn L. DeVito13-Mar-06 10:43 
Questionparse XML problem Pin
alaa2213-Mar-06 9:52
alaa2213-Mar-06 9:52 
AnswerRe: parse XML problem Pin
George L. Jackson13-Mar-06 10:44
George L. Jackson13-Mar-06 10:44 
AnswerRe: parse XML problem Pin
alaa2213-Mar-06 20:25
alaa2213-Mar-06 20:25 
AnswerRe: parse XML problem Pin
George L. Jackson14-Mar-06 1:27
George L. Jackson14-Mar-06 1:27 
AnswerRe: parse XML problem Pin
alaa2214-Mar-06 2:28
alaa2214-Mar-06 2:28 
GeneralRe: parse XML problem Pin
George L. Jackson14-Mar-06 6:16
George L. Jackson14-Mar-06 6:16 
QuestionModifying DMI Information - I REALLY NEED THAT!!!! Pin
honae13-Mar-06 8:27
honae13-Mar-06 8:27 
AnswerRe: Modifying DMI Information - I REALLY NEED THAT!!!! Pin
George L. Jackson13-Mar-06 10:31
George L. Jackson13-Mar-06 10:31 
AnswerRe: Modifying DMI Information - I REALLY NEED THAT!!!! Pin
Saksida Bojan13-Mar-06 19:39
Saksida Bojan13-Mar-06 19:39 
QuestionDMI EDITOR Pin
honae13-Mar-06 7:25
honae13-Mar-06 7:25 
AnswerRe: DMI EDITOR Pin
George L. Jackson13-Mar-06 10:31
George L. Jackson13-Mar-06 10:31 
Questionhow to know the dll export function's declare? Pin
HOW WHAT12-Mar-06 2:34
HOW WHAT12-Mar-06 2:34 
AnswerRe: how to know the dll export function's declare? Pin
oshah14-Mar-06 23:24
oshah14-Mar-06 23:24 

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.