nidhaletec
Messages postés44Date d'inscriptionjeudi 12 juin 2008StatutMembreDernière intervention28 mars 2009
-
27 janv. 2009 à 22:37
BunoCS
Messages postés15472Date d'inscriptionlundi 11 juillet 2005StatutModérateurDernière intervention25 mars 2024
-
28 janv. 2009 à 10:43
std::vector<double> getWayCoords(int id) const;
/**
* Return a vector of the coordinates of all the points making up a way,
* in lon-lat order.
* @param id Way id to search for
* @return An empty vector if no way with the given ID is part of this
* Components instance, or a vector of size 2*n for a way of n nodes
* containing the lon/lat coordinates of all way nodes
*/
ceci est dans une classe qui s'appelle components
j'ai un objet comp1 de cette classe donc comment je peut appeler ce vecteur ?
Exemple extrait de ce document
vector<double> ModifierNote ( vector<double> _Note )
{
int NoNote = 0;
cout << "Entrez le numero de la note : ";
cin >> NoNote;
if (NoNote >= 0 && NoNote < _Note.size())
{
cout << "Entrez la nouvelle valeur : ";
cin >> _Note[NoNote];
}
return _Note;
}
nidhaletec
Messages postés44Date d'inscriptionjeudi 12 juin 2008StatutMembreDernière intervention28 mars 2009 27 janv. 2009 à 22:55
merci mais c pas ce que je cherche exactement, car je ma question est comment appeler cette fonction si elle est definie sous une classe.
class Components
{
public:
/** Constructor */
Components();
/** Destructor */
~Components();
/**
* Return a vector of the coordinates of all the points making up a way,
* in lon-lat order.
* @param id Way id to search for
* @return An empty vector if no way with the given ID is part of this
* Components instance, or a vector of size 2*n for a way of n nodes
* containing the lon/lat coordinates of all way nodes
*/
std::vector<double> getWayCoords(int id) const;
/**
* Return a vector of all node IDs for the given way
* @param id Way ID
* @return A vector of all node IDs for the given way. The vector will be empty
* if the given way does not exist in this Components instance or has no
* nodes assigned to it
*/
std::vector getWayNodes(int id) const;
};
par exemple si on definie un objet OSM::Components *comp1