Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char* create_message(node router){
- ostringstream aux;
- vector<pair<int, int> > lista = auxListIdCost(router);
- //In aux salvez datele de care am nevoie din structura Routerului
- aux << router.id_node << " " << router.versiune;
- for(int i = 0; i <router.nr_vecini; i++){
- aux <<" " << lista[i].first << " " << lista[i].second;
- }
- const string temp = aux.str();
- char * fin = new char[temp.length() + 1];
- strcpy(fin, temp.c_str());
- //memset(fin,'\0', strlen(fin));
- return fin;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement