Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. hectorDUQUE

    STL map (read only)

    yes, it is! but, i don´ t understantd why. It is not the iterator it self which i ám trying to modify. ???? thanks .... hector
  2. hectorDUQUE

    STL map (read only)

    the error was reported in the line groups2countersIterator->second++;
  3. hectorDUQUE

    STL map (read only)

    hi guys, do you know what this means: error: increment of data-member 'std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>::second' in read-only structure i don't understand how a map structure can be a read only structure. The code is...
  4. hectorDUQUE

    STL find

    ohh, this stuff is getting me crazy ... this code works for the map data part: groupOfNumbers_type::const_iterator groupOfNumbersIterator = group2numbersIterator->second.begin(); groupOfNumbersIterator = group2numbersIterator->second.find( 28 ); thanks cpjust hector
  5. hectorDUQUE

    STL find

    i've done before: hD_loadResultGroupsFIND.cxx:70: error: 'class std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::set<int, std::less<int>, std::allocator<int> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >...
  6. hectorDUQUE

    STL find

    thanks cpjust, it works. what about the map data part? wit this code: groupOfNumbers_type::const_iterator groupOfNumbersIterator; groupOfNumbersIterator = group2numbers->second.find( "28" ); i got: hD_loadResultGroupsFIND.cxx:69: error: base operand of '->' has non-pointer type...
  7. hectorDUQUE

    STL find

    Are you trying to find a map key with "something" or map data with "something"?" R/ a map key with "something" "What does the map_group_type typedef look like?" typedef std::set<int> groupOfNumbers_type; typedef std::map<string, groupOfNumbers_type> map_group_type; "If you're...
  8. hectorDUQUE

    STL find

    hi guys, i have sintax problems using a STL find function :-( typedef std::set<string> groupOfFileNames_type; typedef std::map<string, groupOfFileNames_type> map_groupFN_type; typedef std::vector<string> resultsGroups_type; typedef std::map<string, resultsGroups_type>...
  9. hectorDUQUE

    close all file descriptors using fork

    you have to start your child process by closing all the file descriptors. I think there is not option, because the fork function duplicates the program context, which includes the file descriptors. ... FILE *fd; fd=fopen(filename, "r"); ... if (Fork() == 0) { //child process...
  10. hectorDUQUE

    string to char*

    hi guys, i am getting problems trying to convert a c++ basic string to a char * (C languaje). error: cannot convert ‘std::string’ to ‘char*’ for argument ‘1’ to ‘void hD_readIniFile(char*, map_group_type&, map_groupFN_type&)’ string fn_ch(*cur_edge); hD_readIniFile(fn_ch...
  11. hectorDUQUE

    string to char*

    hi guys, i am getting problems trying to convert a c++ basic string to a char * (C languaje). error: cannot convert ‘std::string’ to ‘char*’ for argument ‘1’ to ‘void hD_readIniFile(char*, map_group_type&, map_groupFN_type&)’ string fn_ch(*cur_edge); hD_readIniFile(fn_ch...
  12. hectorDUQUE

    STL double-linked list

    btw, take a look at an STLplus implementation: #include "stlplus.hpp" #include <vector> using namespace std; #define WON 1 #define LOSS 0 void hD_initGraph(digraph<string,int>& graph){ digraph<string,int>::iterator node1 = graph.insert("1")...
  13. hectorDUQUE

    pointers (help)

    yeah; just don't declare as a const type. thanks, hector
  14. hectorDUQUE

    pointers (help)

    hi guys, please some help with pointers: this STLplus code is good: int main(int argc, char* argv[]) { digraph<string,int> graph; digraph<string,int>::iterator node1 = graph.insert("1"); } this one has a reference problem: void initGraph(const digraph<string,int>& graph){...
  15. hectorDUQUE

    STL double-linked list

    thanks jstreich for comments, but the structure i need is not a heap, it is a graph. It looks like my picture loss some white characters and is not as clear as i wanted. i'll try this notation (node4 is new one): node1 = 8 node2 = 10 node3 = 25 node4 = 50 arc1 = node1 to node1 arc2 = node2 to...
  16. hectorDUQUE

    STL double-linked list

    thanks uolj for your important contribution, i'll take a look at ... i've also found STLplus: http://stlplus.sourceforge.net/ it is free ang has a STL extention for directed graphs. I hope it works. i will also take a look at boost; yes, they have something for graphs. hector
  17. hectorDUQUE

    STL double-linked list

    there exist GTL, but is not free and is much much more than i need :-( hector
  18. hectorDUQUE

    STL double-linked list

    thanks uolj for comments, i also need to implement a type of graph, because i have to reference the two next nodes instead of a previous one. i mean, i could have something like this: |<------------| | | |<-- | | | | | |--> 8 ---> 10 ---> 25...
  19. hectorDUQUE

    error: extra qualification

    well, you are right, code context must be posted :-( in this case, hd is a namespace and socket a class: namespace jmc { ... class Socket { ... protected: ... //wrong line: //std::string Socket::connectionName()...
  20. hectorDUQUE

    STL double-linked list

    hi guys, i wonder if somebody knows where to find an STL library for implemeting a double-linked list: previous and next element and so on ... thanks in advance, hector

Part and Inventory Search

Back
Top