divyang4481 / mipt-hw

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

task04 Geometry (Таташина) #261

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
tatashina_anna/task04_geom

Original issue reported on code.google.com by anna.tat...@gmail.com on 24 May 2013 at 7:56

GoogleCodeExporter commented 9 years ago
Не собирается:
main.cpp: In constructor 'TPoint<T>::TPoint(T, T)':
main.cpp:26:8: error: 'NewX' was not declared in this scope
main.cpp:27:8: error: 'NewY' was not declared in this scope
main.cpp: At global scope:
main.cpp:55:17: error: expected ')' before '&' token
main.cpp: In member function 'bool TPolygon<T>::HasPoint(const TPoint<T>&) 
const':
main.cpp:130:3: error: 'Polygon' was not declared in this scope
main.cpp:130:28: error: expected ';' before ':' token
main.cpp:131:28: error: expected ';' before ':' token
main.cpp:134:11: error: missing template arguments before 'v1'
main.cpp:134:11: error: expected ';' before 'v1'
main.cpp:135:11: error: missing template arguments before 'v1'
main.cpp:135:11: error: expected ';' before 'v1'
main.cpp:136:11: error: missing template arguments before 'v2'
main.cpp:136:11: error: expected ';' before 'v2'
main.cpp:137:11: error: missing template arguments before 'v2'
main.cpp:137:11: error: expected ';' before 'v2'
main.cpp:139:39: error: 'v1' was not declared in this scope
main.cpp:139:51: error: 'v2' was not declared in this scope
main.cpp:139:61: error: there are no arguments to 'VectorProduct' that depend 
on a template parameter, so a declaration of 'VectorProduct' must be available 
[-fpermissive]
main.cpp:139:61: note: (if you use '-fpermissive', G++ will accept your code, 
but allowing the use of an undeclared name is deprecated)
main.cpp:139:100: error: there are no arguments to 'ScalarProduct' that depend 
on a template parameter, so a declaration of 'ScalarProduct' must be available 
[-fpermissive]
main.cpp:142:18: error: call of overloaded 'abs(double&)' is ambiguous
main.cpp:142:18: note: candidates are:
In file included from /opt/local/include/gcc47/c++/cstdlib:66:0,
                 from /opt/local/include/gcc47/c++/ext/string_conversions.h:41,
                 from /opt/local/include/gcc47/c++/bits/basic_string.h:2814,
                 from /opt/local/include/gcc47/c++/string:54,
                 from /opt/local/include/gcc47/c++/bits/locale_classes.h:42,
                 from /opt/local/include/gcc47/c++/bits/ios_base.h:43,
                 from /opt/local/include/gcc47/c++/ios:43,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from main.cpp:1:
/usr/include/stdlib.h:146:6: note: int abs(int)
In file included from 
/opt/local/include/gcc47/c++/ext/string_conversions.h:41:0,
                 from /opt/local/include/gcc47/c++/bits/basic_string.h:2814,
                 from /opt/local/include/gcc47/c++/string:54,
                 from /opt/local/include/gcc47/c++/bits/locale_classes.h:42,
                 from /opt/local/include/gcc47/c++/bits/ios_base.h:43,
                 from /opt/local/include/gcc47/c++/ios:43,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from main.cpp:1:
/opt/local/include/gcc47/c++/cstdlib:175:3: note: long long int 
__gnu_cxx::abs(long long int)
/opt/local/include/gcc47/c++/cstdlib:140:3: note: long int std::abs(long int)

Original comment by aivyu...@gmail.com on 26 May 2013 at 2:41

GoogleCodeExporter commented 9 years ago
Вроде все исправила... По крайней мере у 
меня и собиралось, и собирается сейчас, 
поэтому могу ошибаться

Original comment by anna.tat...@gmail.com on 26 May 2013 at 2:57

GoogleCodeExporter commented 9 years ago
Не собирается:
main.cpp:55:18: error: expected ')' before 'NewBeg'
main.cpp: In member function 'bool TPolygon<T>::HasPoint(const TPoint<T>&) 
const':
main.cpp:130:3: error: 'Polygon' was not declared in this scope
main.cpp:130:28: error: expected ';' before ':' token
main.cpp:131:28: error: expected ';' before ':' token
main.cpp:134:16: error: expected initializer before '.' token
main.cpp:135:16: error: expected initializer before '.' token
main.cpp:136:16: error: expected initializer before '.' token
main.cpp:137:16: error: expected initializer before '.' token
main.cpp:139:39: error: 'v1' was not declared in this scope
main.cpp:139:51: error: 'v2' was not declared in this scope
main.cpp:139:61: error: there are no arguments to 'VectorProduct' that depend 
on a template parameter, so a declaration of 'VectorProduct' must be available 
[-fpermissive]
main.cpp:139:61: note: (if you use '-fpermissive', G++ will accept your code, 
but allowing the use of an undeclared name is deprecated)
main.cpp:139:100: error: there are no arguments to 'ScalarProduct' that depend 
on a template parameter, so a declaration of 'ScalarProduct' must be available 
[-fpermissive]
main.cpp:142:18: error: call of overloaded 'abs(double&)' is ambiguous
main.cpp:142:18: note: candidates are:
In file included from /opt/local/include/gcc47/c++/cstdlib:66:0,
                 from /opt/local/include/gcc47/c++/ext/string_conversions.h:41,
                 from /opt/local/include/gcc47/c++/bits/basic_string.h:2814,
                 from /opt/local/include/gcc47/c++/string:54,
                 from /opt/local/include/gcc47/c++/bits/locale_classes.h:42,
                 from /opt/local/include/gcc47/c++/bits/ios_base.h:43,
                 from /opt/local/include/gcc47/c++/ios:43,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from main.cpp:1:
/usr/include/stdlib.h:146:6: note: int abs(int)
In file included from 
/opt/local/include/gcc47/c++/ext/string_conversions.h:41:0,
                 from /opt/local/include/gcc47/c++/bits/basic_string.h:2814,
                 from /opt/local/include/gcc47/c++/string:54,
                 from /opt/local/include/gcc47/c++/bits/locale_classes.h:42,
                 from /opt/local/include/gcc47/c++/bits/ios_base.h:43,
                 from /opt/local/include/gcc47/c++/ios:43,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from main.cpp:1:
/opt/local/include/gcc47/c++/cstdlib:175:3: note: long long int 
__gnu_cxx::abs(long long int)
/opt/local/include/gcc47/c++/cstdlib:140:3: note: long int std::abs(long int)

Можеть быть закоммитить забыли?
Какая среда? VS? Я собираются с помощью g++4.7 с 
поддержкой С++11.

Original comment by aivyu...@gmail.com on 26 May 2013 at 3:16

GoogleCodeExporter commented 9 years ago

Original comment by aivyu...@gmail.com on 26 May 2013 at 3:16

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Зашла под убунтой. Исправила.

Original comment by anna.tat...@gmail.com on 26 May 2013 at 6:44

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

Оценка: 0.2 балла.

Original comment by aivyu...@gmail.com on 26 May 2013 at 8:33