No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hello, In the past I had written the following function to parse a string that was tab delimited: [CODE]void parseLine(string s) { string fid, src, dst, cap_e, cap_f, fare_e, fare_f; istringstream isstream (s); getline(isstream,fid,'|'); getline(isstream,src,'|'); getline(isstream,dst,'|'); getline(isstream,cap_e,'|'); getline(isstream,cap_f,'|'); getline(isstream,fare_e,'|'); getline(isstream,fare_f,'|'); }[/CODE] Now I need to parse a string where I … |
|
If I want to create an associative array in C++ without the use of std::map, what are the possibilities? I want to set it up as a template so that it can be used with various datatypes. Example: Array<int> // (associative array), and then be able to insert elements into … |
|
I need to write a template for binary search routine so that it works with arrays of various types (int, char, c style strings). Here is how I have it written,it seems to work when I have a interger array but fails on chars. I need help fixing this. Binary … |
|
This is part of an assignment that I am doing. I have to create a Queue (FIFO) using templates. I have been able to create that and it works. There is one more part to this same assignment where I am unable to figure out how to proceed. Here is … |
|
I am a novice user and am proposing to do a project on airline reservation system in C++ as a part of class. This is something I myself have proposed. I have started to design the classes and need some help. So far I have only created 2 basic classes: … |