divyang4481 / mipt-hw

Automatically exported from code.google.com/p/mipt-hw
0 stars 0 forks source link

task06_TDateTime Савинова #242

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
/savinova_anna/task06_TDateTime/

Original issue reported on code.google.com by anna.sav...@phystech.edu on 13 May 2013 at 9:53

GoogleCodeExporter commented 9 years ago
Пишу в main след код:
        TDateTime dt1 = TDateTime::Now();
        cout << dt1 << endl;

        TTimeSpan sp(1, 1, 1, 1, 1);

        TDateTime dt2 = dt1 + sp;
        dt1 = dt1 + sp;
        TDateTime dt3 = dt2 - p;
        dt1 = dt1 - sp;

        cout << dt1 << endl;
        cout << dt2 << endl;
        cout << dt3 << endl;

Пытаюсь скомпилировать:
TDateTime.cpp: In function ‘int main()’:
TDateTime.cpp:305: error: no match for ‘operator=’ in ‘dt1 = dt1. 
TDateTime::operator+(((const TTimeSpan&)((const TTimeSpan*)(& sp))))’
TDateTime.cpp:207: note: candidates are: TDateTime& 
TDateTime::operator=(TDateTime&)
TDateTime.cpp:306: error: ‘p’ was not declared in this scope
TDateTime.cpp:307: error: no match for ‘operator=’ in ‘dt1 = dt1. 
TDateTime::operator-(((const TTimeSpan&)((const TTimeSpan*)(& sp))))’
TDateTime.cpp:207: note: candidates are: TDateTime& 
TDateTime::operator=(TDateTime&)

Решение не принято.

Свой код я закоммитил в SVN. Так что, не 
забудьте сделать SVN Update.

Original comment by aivyu...@gmail.com on 19 May 2013 at 12:21

GoogleCodeExporter commented 9 years ago

Original comment by anna.sav...@phystech.edu on 21 May 2013 at 1:58

GoogleCodeExporter commented 9 years ago
Решение принято.

Минус 20% за опоздание.

Original comment by aivyu...@gmail.com on 26 May 2013 at 12:27