Closed GoogleCodeExporter closed 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
Original comment by anna.sav...@phystech.edu
on 21 May 2013 at 1:58
Решение принято.
Минус 20% за опоздание.
Original comment by aivyu...@gmail.com
on 26 May 2013 at 12:27
Original issue reported on code.google.com by
anna.sav...@phystech.edu
on 13 May 2013 at 9:53