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...
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
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...
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...
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>...
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...
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...
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...
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")...
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){...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.