Hi
My overall goal is to read a csv file
and then create a graph out of this. Which can be provided as an input
to the
boost graph library.For creating vertex
set i have used vector and for edges i m making use of multiarray.
The sample code snippet is provided
below.. (This is not the actual code)
/*
vector<string> vect;
string str="L1,L2,L3,L4,L5";
string str1="L1,0,0,0,0";
string str2="L2,0,0,0,0";
boost::stringtok(vect,str,",");
typedef boost::multi_array<string,2> my_array;
typedef my_array::index index;
int size =vect.size();
my_array A1(boost::extents[size][size]);
int i=0;
for(index jt=0;jt!=size;jt++)
{
boost::stringtok(A1[0][jt],str1,",");
}
The one in Bold gives an error message..
c:\srlgrp\boostlib\boost_1_34_0\boost_1_34_0\boost\pending\stringtok.hpp(103)
: error C2039: 'push_back' : is not a member of 'multi_array<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >,2,class
std::allocator
<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > >
>'
Please help regarding this.
Also let me know if this is the best
way to perform the task or something else will be better...
Abhishek Vyas
Tata Consultancy Services
Mailto: abhishek.v@tcs.com
Website: http://www.tcs.com
____________________________________________
Experience certainty. IT Services
Business Solutions
Outsourcing
____________________________________________=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you