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. |
- default argument given for parameter error - 2 Updates
- Onwards and upwards - 3 Updates
- C++ and Web Services (OT maybe?) - 2 Updates
- This code shouldn't run. Heck! It shouldn't even compile! - 2 Updates
- Is it OK to OCCASIONALLY submit C++ code for comments in this group, like RFC? - 1 Update
zwei1000vier10@gmail.com: Oct 03 03:47PM -0700 I get this error even though i have the default argument only in the header file , as it should be. Googling i found that puting the def. value both in the header AND the implementation file is what's usually causing this error. I hope i wake up to a solution.... thank you |
Ian Collins <ian-news@hotmail.com>: Oct 04 11:50AM +1300 > value both in the header AND the implementation file is what's > usually causing this error. > I hope i wake up to a solution.... thank you What error? Post the code and the error message. -- Ian Collins |
woodbrian77@gmail.com: Oct 02 08:20PM -0700 On Thursday, October 2, 2014 2:55:53 PM UTC-5, Mr Flibble wrote: > Stop reinventing a not very good wheel mate. Use boost.asio; abstract > it if you like (I do). I'm willing to support someone who wants to use the C++ Middleware Writer (CMW) and asio together. I'll donate 16 hours/week for six months to a project that uses the CMW. Also we'll pay $999 and give a $1,000 investment in Ebenezer Enterprises to someone who helps us find someone interested in this. We'll pay the $999 after working for four months on the project. Ebenezer Enterprises works to reward investments to 3 times the original amount. So the investment would result in between $0 and $3,000, depending on how things go for the company. Brian Ebenezer Enterprises http://webEbenezer.net |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Oct 03 01:31PM +0100 > investments to 3 times the original amount. So the investment > would result in between $0 and $3,000, depending on how > things go for the company. That's not how company ownership works mate: if I invest in a company I expect to own a percentage of it and it's profits. /Flibble |
woodbrian77@gmail.com: Oct 03 09:24AM -0700 On Friday, October 3, 2014 7:31:45 AM UTC-5, Mr Flibble wrote: > > things go for the company. > That's not how company ownership works mate: if I invest in a company I > expect to own a percentage of it and it's profits. "The earth is the L-rd's, and everything in it, the world, and all who live in it;" Psalms 24:1 Potential financial reward is all we promise. I'm a manager/steward of the company. Brian Ebenezer Enterprises http://webEbenezer.net |
woodbrian77@gmail.com: Oct 02 09:46PM -0700 On Thursday, October 2, 2014 9:02:11 AM UTC-5, Jorgen Grahn wrote: > Unix pipelines, perhaps tunneled over ssh. But that might very well > not be feasible in your environment: it just happenes to often work > in mine. Unix pipelines work on binary formats. I'm thinking of how helpful it is to use compression to create a binary file out of a bunch of text files. Why have so many spent so many hours improving the compression algorithms and associated tools? Bandwidth. By converting the files to a binary format, you're able to accomplish the same thing with less bandwidth. Brian Ebenezer Enterprises - Shalom. http://webEbenezer.net |
scott@slp53.sl.home (Scott Lurndal): Oct 03 01:40PM >> not be feasible in your environment: it just happenes to often work >> in mine. >Unix pipelines work on binary formats. No. Unix pipelines transfer formless streams of bytes. >compression algorithms and associated tools? Bandwidth. >By converting the files to a binary format, you're able >to accomplish the same thing with less bandwidth. Not necessarily. Not even generally. Consider the case of a numeric field. The uncompressed text representation of a zero value would consume a single byte, whereas a binary version may consume four bytes (depending on the desired magnitude of the value in the binary stream). When the binary values exceed a fundamental unit in length (e.g. an 8-bit byte), then the algorithms at both ends must be aware of the endianess of the binary stream and convert to the endianess of the host platform. |
DSF <notavalid@address.here>: Oct 02 09:48PM -0400 Hello group! Whilst perusing my string class for another posting, I encountered code that I originally thought was in error. I see now how it is working, but there is still one aspect that puzzles me. That's why this is being posted instead of being dumped into the bit bucket. First, the class (FString, which is a template class) contains, among others, four dual string parameter constructors. One for each permutation of const FString<CH>& and const char *. They construct a string object that is a left-to-right concatenation of the two parameters. template <class CH> class FString { public: // One of four: FString(const FString<CH>& string1, const FString<CH>& string2, bool casesensitive = csdefault); // The + operator is overloaded in the same manner, as in: // One of four: friend const FString<CH> operator+(const FString<CH>& str1, const FString<CH>& str2); }; // Within the class. And outside: template <class CH> const FString<CH> operator+(const FString<CH>& str1, const FString<CH>& str2) { return FString<CH>(str1, str2); } I first thought the error here is that I was calling a constructor to do the concatenation. But I see now I am merely creating an unnamed object. Since the object is returned by value, the scope of the object is no problem, but I'm still left with one puzzler: Constructors are not declared (defined? I always get those two mixed-up!) with a return value. If I recall correctly you are not supposed to use a constructor as an rvalue. (As an aside, I know that every constructor created with my ancient Borland C/C++ 5.xx returns "this". Disassembly proves it. So have I forgotten something and this is legal code, or just something my compiler is allowing? If it's legal, my guess would be that I'm not returning the value of the constructor, but rather a copy of the temporary object the constructor constructed. Thanks for any help, DSF "'Later' is the beginning of what's not to be." D.S. Fiscus |
Paavo Helde <myfirstname@osa.pri.ee>: Oct 03 01:17AM -0500 DSF <notavalid@address.here> wrote in > Constructors are not declared (defined? I always get those two > mixed-up!) with a return value. If I recall correctly you are not > supposed to use a constructor as an rvalue. Apparently you are confused by the C++ syntax CLASSNAME(ARGS). In C++, a typename followed by arguments in parenthesis constructs an object of that type: int k = 1; double f = double(k); This is the same for user-defined classes except that the class needs to have a suitable constructor declared, obviously. As a side note, constructors do not need a return type declaration, because they already know which type they are constructing. > (As an aside, I know that > every constructor created with my ancient Borland C/C++ 5.xx returns > "this". Disassembly proves it. Disassembly is irrelevant if you are concerned with C++ language syntax. > So have I forgotten something and this is legal code, or just > something my compiler is allowing? Yes, it's legal and widely used. > If it's legal, my guess would be that I'm not returning the value of > the constructor, but rather a copy of the temporary object the > constructor constructed. What you mean by "value of the constructor"? Logically, if you return a temporary from a functions, then the temporary is constructed in the scope of the function and then a copy of it is made when the function return value is used somewhere. However, compilers are pretty good optimizing away these temporaries nowadays, see http://www.parashift.com/c++-faq/return-by-value-optimization.html hth Paavo |
Robert Wessel <robertwessel2@yahoo.com>: Oct 02 07:53PM -0500 On Thu, 2 Oct 2014 19:08:22 -0400, "J. Clarke" <jclarkeusenet@cox.net> wrote: >release to market it on his own. Don't assume that a company, even a >very large one with lots and lots of lawyers, will be completely >inflexible on such a matter. Just don't remind them of that particular anecdote when you ask them... ;-) |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment