« first day (66 days earlier)      last day (4865 days later) » 

1:44 AM
Wow, where did everyone go?
 
 
1 hour later…
2:56 AM
 
 
6 hours later…
8:33 AM
@JamesMcNellis: Bed. We're not all in your timezone.
Hey, we're did you go ;-) ?
 
9:11 AM
hello
anyone know how to convert a LPTSTR to a string?
 
Yes, thanks. But isn't SO the place to ask questions?
 
if it's short questions
don't why I cannot ask them here
 
You can, but there are many more people answering on SO.
It's been asked before, too: stackoverflow.com/search?q=LPTSTR+string
 
 
1 hour later…
sbi
10:16 AM
Wow, it's empty here today. Has everyone already left for the holidays?
 
no I'm here
hello
 
sbi
@Tony I had noticed you. :) But being in chat with three other people hasn't happened to me in a long time.
 
what do you mean?
It's almost Xmas, that might explain the lack of people on this chat today
 
 
1 hour later…
11:25 AM
I was hunting down this link for a comment: gotw.ca/gotw/057.htm
 
@CharlesBailey Well, I was obviously wrong, so I saw no point in keeping the question alive :) Thanks for the link.
 
I thought it was an interesting enough question (certainly the second part of the question).
 
Hmmm... I could ask the second part again, but I feel kinda stupid now :)
Plus, I already know the answer now...
@CharlesBailey Did you vote to undelete my question? :)
 
11:43 AM
I'd just forget it an move on! (And yes, I voted to undelete but it was sort of a knee jerk reaction as I just finished editing my answer to discover that my answer was deleted which surprised me so I hit the nearest undelete button before I really worked out what had happened.)
 
 
3 hours later…
2:24 PM
Passing a boost::shared_ptr<T> to a function where I want to change it in a function and see the change outside the function, is it better to pass it as a non-const ref or just return it from the function instead and pass by value?
 
sbi
2:48 PM
@Tony "...change it..." You mean you want to change the object it points to or do you want to point it at a different object?
 
change the object is points to
not the shared_ptr itself
sorry
the one I'm passing in is a NULL shared_ptr of some type, so I'm reassigning it to a different object
so I guess I am changing what it points to
 
sbi
So you want to change the pointer, not the object it points to?
 
I'll show you
void ResolverQueueHandler::RemoveFromResolverRequestQueue(boost::shared_ptr<ResolverRequest>& request)
{

	request = boost::shared_ptr<ResolverRequest>(requests.back());

	requests.remove(requests.back());
}
 
sbi
Is that a threat? :)
 
no
requests is a std::list of ResolverRequest objects
 
2:58 PM
@Tony: request = means you're changing the pointer, not the pointee.
 
@FredOverflow so it seems
but is passing by ref the right way here or better to just return from the function and avoid passing?
 
@Tony returning a shared_ptr is probably cleaner. I would do it that way.
 
@FredOverflow you're right, and it's probably safer too
 
You could also return a unique_ptr or, if you don't have C++0x, an auto_ptr.
 
cuz by ref if I accidentally delete it, I have a problem
 
 
5 hours later…
sbi
8:00 PM
Should this really be an FAQ entry?
5
Q: What does a constructor return?

Invisible HulkMy question is what does a constructor return? This question is not quite different from "What is the return type of a constructor?" I have read somewhere that a constructor returns a complete object implicitly (i.e implicit return type is the name of the class) but it shall not be specified expl...

And this:
2
Q: How do I make a program from my C++ code?

PigBenI found this code: #include <iostream> int main() { std::cout << "Hello World!" << std::endl; } How do I run this code? What software do I need? How do I use that software to make a program? I thought this would be a good faq for absolute beginners. Each answer could p...

 
No.
Also no.
 
8:20 PM
@sbi: That first one should be. It puts me +21 closer to a badge in [c++-faq] :-P
No, neither of those are asked frequently enough to be FAQ.
 
sbi
@JamesMcNellis Oh, how does one find out about that?
Another one:
I'll remove that.
1
Q: How can I avoid including class implementation files?

Dave DanuveInstead of doing #include "MyClass.cpp" I would like to do #include "MyClass.h" I've read online that not doing so is considered bad practice.

 
@sbi Agreed.
@sbi The badges are at +100 votes/20 upvoted answers for bronze, +400 votes/80 upvoted answers for silver, and +1k votes/200 upvoted answers for gold. You can find your number of answers and votes in the tag area on your user page.
I just know it was -21 because I had +21 on my answer to that question :-)
 
sbi
And this would have been a nice spot for GMan to hang his copy-and-swap answer from:
4
Q: Copy constructor and = operator overload in C++: is a common function possible?

MPelletierSince a copy constructor MyClass(const MyClass&); and an = operator overload MyClass& operator = (const MyClass&); have pretty much the same code, the same parameter, and only differ on the return, is it possible to have a common function for them both to use?

I don't think it should be removed from the tag, though. It's a good question. But maybe we could merge the copy-and-swap answer into this?
 
@sbi Maybe we can just close that one as a duplicate of the C+S question.
 
8:36 PM
I believe that, much like in tournament poker, the more FAQs we have the less each one is worth. We should be careful about what we tag as a FAQ.
2
 
@JohnDibling We are being careful what we are tagging as FAQ.
There's nothing to stop other people from tagging things as FAQ.
 
sbi
@JamesMcNellis Define "we".
0
Q: Is array name a pointer in C?

tsubasaIs an array's name a pointer in C? If not, what is the difference between an array's name and a pointer variable?

I'm not too fond about this one either, although I agree that we should have such a question.
 
@sbi You and me. I was sure about me; I was guessing about you.
@sbi I'm glad we have a question about that.
 
Hello to all! Is it okay to ask a question about STL here? I think the question is simple enough, but I didn't find anything yet, during my first search.
 
Not another array/pointer question grrrrr. Evidence that C and C++ are both very badly taught.
 
8:46 PM
If it's a very short question. Otherwise, it's best to ask a question on Stack Overflow.
 
Not an array/pointer question, hehe. But it involves data structures. If I delete an element from a map, does iterators to other elements turn invalid?
 
Personally, I think that you should head straight to SO. I prefer to meta-chat here but that might just be me.
 
@Charles
 
sbi
Can somebody please take over the ring fro me? This discussion is too infuriating for me.
 
sorry, pressed enter accidentaly. @CharlesBailey, I guess I'll post this question then, in order to include it in the database =)
I just thought of asking here because it seems pretty simple, idk...
 
8:50 PM
@sbi: Oh dear, you're on your own.
 
sbi
@CharlesBailey Coward! :)
3
Oh boy. Not only do we have many duplicates, they are now also nominated to FAQ entries:
8
Q: What is this weird colon-member syntax in the constructor?

nilsRecently I've seen an example like the following: #include <iostream> class Foo { public: int bar; Foo(int num): bar(num) {}; }; int main(void) { std::cout << (new Foo(42))->bar << std::endl; return 0; } What does this strange : bar(num) mean? It somehow seems to...

2
Q: What is the member variables list after the colon in a constructor good for?

OscarRyzI'm reading this C++ open source code and I came to a constructor but I don't get it ( basically because I don't know C++ :P ) I understand C and Java very well. TransparentObject::TransparentObject( int w, int x, int y, int z ) : _someMethod( 0 ), _someOtherMethod( 0 ), _some...

Here's another pair:
31
Q: What are POD types in C++?

ceretullisI've been following SO for a bit now, and I've come across this term POD-type a few times... what does it mean?

7
Q: What are Aggregates and POD's and how/why are they special?

Armen TsirunyanThis FAQ is about Aggregates and POD's and covers the following material: What are Aggregates? What are POD's (Plain Old Data)? How are they related? How and why are they special?

 
Every time I see POD I think of
Pod people (also known as The Body Snatchers) is a nickname given to an alien species featured in the 1955 novel The Body Snatchers by Jack Finney, the 1956 film Invasion of the Body Snatchers, the 1978 remake of the same name and the 1993 film Body Snatchers. History from the novel The Pod People are a race of nomadic, extraterrestrial parasites originating from a now dying planet. Realizing that it was only a matter of time before the planet's resources would be completely depleted, the pods somehow evolved the ability to defy gravity and leave their planet's atmosphere in the search...
 
What happened to the original C++ room?
 
sbi
@CharlesBailey Which one was the original one?
 
This is the original room.
 
9:00 PM
Did it get renamed, then?
 
Yes, a few times.
 
sbi
@Charles This one got renamed often.
 
Any deep dark reason for that?
 
sbi
(That reminds me that the description is already like two weeks old. Time to change it?)
@CharlesBailey I think people had fun doing so. :)
 
@CharlesBailey There are a lot of room owners that can change it, so it gets changed occasionally
 
9:02 PM
/me tests /me functionality
/me headdesks
 
brb. Gotta go get more coffee so they don't kick me out of the coffee shop.
 
sbi
In The Beginning[TM] there were several C++ chat rooms. I think this one was the oldest, but was abandoned by its owner, so others were created. At which point some mod stepped in to end this madness by transferring ownership to several then active members. (This also got the idea started to have many owners , so this wouldn't happen again.)
I was trying to find the discussions leading to this in the room's transcript, but I failed. But it's out there, you can look it up if you have enough time at your hand.
 
Sounds like a model process for creating the next version of a computer language.
 
sbi
Anyway, I'm outta here, going home. See you tomorrow!
 
@sbi "In general, function objects are better for this than functions". I had never thought of inlining in this context =|
 
9:08 PM
@sbi I don't ;)
 

« first day (66 days earlier)      last day (4865 days later) »