Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct distanceToPointSort{
- indexedDocument* point ;
- distanceToPointSort(indexedDocument* p): point(p) {}
- bool operator() (indexedDocument* p1,indexedDocument* p2){
- return distance(point,p1) < distance(point,p2) ;
- }
- } ;
- struct distanceToPointSort{
- indexedDocument* point ;
- distanceToPointSort(indexedDocument* p): point(p) {}
- bool operator() (indexedDocument* p1,indexedDocument* p2){
- float d1=distance(point,p1) ;
- float d2=distance(point,p2) ;
- std::cout << "" ; //without this line, I get a segmentation fault anyways
- return d1 < d2 ;
- }
- } ;
- g++ -Wall -Wextra -pedantic -ansi
- #include <stdio.h>
- int main()
- {
- int i = 0, j = 1, k = 2;
- printf("%d %d %dn", *(&j-1), *(&j), *(&j+1));
- return 0;
- }
- volatile float d1=distance(point,p1) ;
- volatile float d2=distance(point,p2) ;
- return d1 < d2 ;
- struct distanceToPointSort{
- indexedDocument* point ;
- distanceToPointSort(indexedDocument* p): point(p) {}
- bool operator() (indexedDocument* p1,indexedDocument* p2){
- return distance(point,p1) < distance(point,p2) ;
- }
- } ;
- struct distanceToPointSort{
- indexedDocument* point ;
- distanceToPointSort(indexedDocument* p): point(p) {}
- bool operator() (indexedDocument* p1,indexedDocument* p2){
- float d1=distance(point,p1) ;
- float d2=distance(point,p2) ;
- std::cout << "" ; //without this line, I get a segmentation fault anyways
- return d1 < d2 ;
- }
- } ;
Add Comment
Please, Sign In to add comment