comp.lang.c++@googlegroups.com | Google Groups | ![]() |
Unsure why you received this message? You previously subscribed to digests from this group, but we haven't been sending them for a while. We fixed that, but if you don't want to get these messages, send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
- Dealing with strings with NULL characters in the middle - 2 Updates
- priority queue - 8 Updates
- Template of a Visual Studio Project for coordinate transformations - 1 Update
- C++ Books for new C++ Programmer (who is experienced in C and Python) - 4 Updates
- or vs || , and a template question - 6 Updates
- boost::posix_time::time_duration fractional seconds - 2 Updates
- How is it this code compiles without errors in VS 2013 ? - 1 Update
- lex question - 1 Update
Chicken Mcnuggets <chicken@mcnuggets.com>: Nov 27 10:36PM On 25/11/14 20:01, Christopher Pisz wrote: > You'd probably want a class structure for the entire response and some > map of name and values inside. I don't know anything about the scgi > protocol though. I've been playing around with this a little bit this evening and can't get it to work correctly. This is my code so far (I've put it up on ideone.com because it wraps in a nasty way when posted here directly): http://ideone.com/TgynzG Unfortunately it throws an out of range exception. This is the actual error: unknown location(0): fatal error in "SCGITest": std::out_of_range: vector::_M_range_check: __n (which is 49) >= this->size() (which is 15) and I'm stumped. I'm also pretty sure my code is incorrect but haven't found the right method to parse a std::vector<char> for the correct values yet. Anyone got any suggestions? Using iterators and containers seem to be a bit of a pain at the moment. As far as I can tell this should be fine since I'm using an iterator which should stop at the end of the vector but it seems that is not the case. |
Chicken Mcnuggets <chicken@mcnuggets.com>: Nov 27 10:39PM On 27/11/14 22:36, Chicken Mcnuggets wrote: > bit of a pain at the moment. As far as I can tell this should be fine > since I'm using an iterator which should stop at the end of the vector > but it seems that is not the case. Doh forgot to add this is my code for initialising the vector: const char *c_netstring = "13:SCGI\01\0,Test"; const int string_length = 15; std::vector<char> netstring {}; for(int i = 0; i < string_length; ++i) { netstring.push_back(c_netstring[i]); } |
elizuniga573@gmail.com: Nov 27 09:08AM -0800 Hi, i have a problem with my priority queue i am trying to create a priority queue of a class called duty with three elements but it produces an error. the sentence is : the .h file is /////////////////////////////////////////////////////////////////////////// #ifndef DUTY_H #define DUTY_H class duty { public: duty(); virtual ~duty(); double costo_reducido; double costo_real; unsigned id; bool operator ==( const duty &d2) ; bool operator <( const duty &d2) ; bool operator >( const duty &d2) ; };
Subscribe to:
Post Comments (Atom)
|
No comments:
Post a Comment