« first day (647 days earlier)      last day (4294 days later) » 

4:00 PM
@JoshElias they use it in the lab where I work
 
@ke
 
It looks spiffy, they showed me videos of the next version
 
@keith.layne have you ever written a c++ plugin for it???
 
It looks like my 3yo daughter will be making 3d games soon by just dancing in front of the screen.
 
user1182183
Hey everyone, if I have a situation like this:
element is added to array
array is being iterated from begin to end
one element is deleted
application crashes,

can this be fixed by using reverse_iterator, rbegin and rend?
 
4:01 PM
@JoshElias not even close. I never played with it, I'm a strictly 1D kinda guy.
 
@GamErix, You should always go backwards when deleting elements.
 
user1182183
so
for (unordered_set <int>::reverse_iterator i = PlayerLoopList.rbegin(); i != PlayerLoopList.rend(); ++i)
{
will do?
 
@keith.layne lol k, thx anyways
 
@GamErix, Should.
 
how is a hash set like an array, really?
 
4:03 PM
@GamErix No, it won't.
 
user1182183
@R.MartinhoFernandes O_O?
 
> References and iterators to the erased elements are invalidated. Other iterators and references are not invalidated.
 
user1182183
if a element gets deleted it will crash?
 
you just can't use the iterator after you use it for a delete.
as in, ++i
 
user1182183
the stupid unhandled ecception because of an out of bounds error strikes again
 
user1182183
4:04 PM
so how can i, um, well fix this?
 
not so much
 
@R.MartinhoFernandes, Oh, there's an easy way around that, though, isn't there?
 
user1182183
because the player can be kicked while the loop is running, when kicked it does continue;
 
user1182183
and one element gets deleted
 
for(auto it = list.begin(); it != list.end(); /* increment in body */) {
    if(should_erase(it)) {
        auto it2 = it++; // increment, but keep a copy for deletion
        list.erase(it2); // copy gets invalidated, but it isn't
    } else {
        ++it;
    }
}
 
4:05 PM
haha shit, maybe I should start rocking that haircut 24/7!
 
user1182183
if(should_erase(it)) ?
 
Whatever condition you use to decide if you're deleting that element.
 
user1182183
well, deleting happens by an outside program, it does happen or it doesnt happen and then it does continue;
 
user1182183
if((clock() - p_AcivityInfo[playerid].LastActive) > AllowedInactivityTime)
{
p_AcivityInfo[playerid].Reported = true;
Report(playerid,CHECK_INACTIVITY);
 
user1182183
Report(...) is an external thing
 
4:08 PM
So just kill the whole if and use the first one.
 
user1182183
and meanwhile it can delete one element, can I just re-set the iterator to begin and end if the size changed?
 
@GamErix Don't access out of bounds?
 
user1182183
@JerryCoffin won't it skip one element?
 
@GamErix Not entirely sure what you're asking there.
 
bananas
 
4:10 PM
@GamErix Wait, are you saying it happens concurrently?
 
yeah, whole nother can o' worms there.
 
user1182183
well let's say my loop calls a remote function, and that remote function decides if to delete an element from the set or let it be there.
 
Is there a windows command that can rename files matching "NNN-LOG" to "NNN.LOG"?
 
MWahahaa, you're screwed.
 
you mean in console?
 
4:11 PM
@GamErix but doesn't tell the iterating function if it deleted the object?
 
user1182183
@MooingDuck I personally use advancedrenamer.com
 
user1182183
it doesn't tell :S
 
user1182183
but I can check if the size changed?
 
maybe
 
At least IIUC, you have one thread (process?) accessing a collection, but another concurrently deleting from the same collection? If so, you'll need to synchronize access to the collection. If it's not concurrent, you probably want to have your other function (or whatever) use its return value to signal what it deleted (if anything).
 
user1182183
4:12 PM
it's the same thread
 
@JerryCoffin not concurrent, just another module that deletes or not, and doesn't tell him
 
user1182183
loop begine -> detect some stuff -> Call remote application -> wait for finish -> continue; -> if element is deleted - crash
 
@MooingDuck, Is a result of NNN-LOG.LOG ok, as long as it gets the extension?
 
@chris yeah, I guess that'd be fine
 
4:13 PM
@MooingDuck, In that case ren *-log *.log did that for me
 
Howdy boys
 
@chris didn't thnik of that. copy can probably do that already
 
@MooingDuck In that case, you have little choice but to assume it always does a deletion.
 
2 mins ago, by R. Martinho Fernandes
MWahahaa, you're screwed.
 
4:15 PM
@MooingDuck You're not really screwed though -- you just have to plan on the worst case.
 
might be enough to do what you want, or a start.
 
user1182183
maybe this will do...
int size = PlayerLoopList.size();
for (unordered_set <int>::iterator i = PlayerLoopList.begin(); i != PlayerLoopList.end();)
{
if(size != PlayerLoopList.size())
{
size = PlayerLoopList.size();
}
else
{
++i;
}
 
Wait, where's the "remote function" call?
 
if the size changes, your iterators are (might be?) invalidated
 
user1182183
"Report()"
 
user1182183
4:16 PM
if(g_Ticked == g_TickMax)
{
int playerid = 0;
int ProcessTicksize = 0;
int ProcessTickindex = 0;
int size = PlayerLoopList.size();
for (unordered_set <int>::iterator i = PlayerLoopList.begin(); i != PlayerLoopList.end();)
{
if(size != PlayerLoopList.size())
{
size = PlayerLoopList.size();
}
else
{
++i;
}
playerid = *i;
int playerstate = GetPlayerState(playerid);
int vid = GetPlayerVehicleID(playerid);
if(g_IS_TRUE(CHECK_INACTIVITY))
{
if(p_IS_TRUE(playerid,CHECK_INACTIVITY))
{
if(p_AcivityInfo[playerid].Reported == false)
 
Stop bombarding us with unformatted walls of code thanks
 
user1182183
hey in my IDE it's formated ; o
 
@MooingDuck did you see my link?
 
user1182183
 
4:17 PM
Are you saying Report has access to PlayerLoopList?
 
@GamErix Yes -- ideone, preferably with enough code to actually compile.
 
@GamErix oh no, you woke up the cat. You're screwed now.
 
@keith.layne opened it, haven't read it yet
 
If so, then you're asking the wrong question. Fix Report.
 
Just wanted to make sure you saw it.
 
user1182183
4:18 PM
let's say that Report can call KICK(PLAYER); , while KICK is called, OnPlayerDisconnect() from my application is called
 
user1182183
and onplayerdisconnect has:
 
user1182183
PlayerLoopList.erase(PlayerLoopList.find(playerid));
 
user1182183
I didn't rly expect that OnPlayerDisconnect will be called while the loop is running..
 
@JimNorton hola
 
user1182183
but yes report calls KICK , kick calls OnPlayerDisconnect
 
4:19 PM
Then you're screwed.
You can't continue the loop with i.
Well, you can if you increment first.
 
@keith.layne Hey how goes it Keith?
 
Same technique.
 
@R.MartinhoFernandes I posted code that does it with two iterators. It's ugly though
 
@JimNorton another day, another ... oh wait, no dollars :)
 
@MooingDuck auto it2 = it++;, use it2 in the body of the loop. No need for messy checks all over.
 
4:22 PM
@keith.layne No dollars! That's just wrong! :-)
 
It's not really true, the VA pays me.
 
@R.MartinhoFernandes I'm pretty sure that doesn't work
 
user1182183
or maybe break the whole loop if size changed ;$ but then some players wouldn't be checked
 
@GamErix I think you need to do some rewriting with some attempt at following the single responsibility principle. Right now, even if you fix this particular problem, the code's enough of a mess that the best you're doing is taking a few chips off the tip of the iceberg.
 
@MooingDuck Why not?
 
4:22 PM
@keith.layne Ah well that's not so bad then..
 
yeah
 
though it occurs to me, all one has to do is make a container of pointers/references, and then iterate over that
 
@MooingDuck No need for that. It's a set.
Erasing only invalidates iterators to the erased element.
 
@R.MartinhoFernandes oh, I guess that does work
 
user1182183
@JerryCoffin believe me, just that part of the code has to be fixed and everything will be in a perfect harmony
 
4:23 PM
mwahahaha
 
@R.MartinhoFernandes oh, I didn't know it was a set
 
it remains valid after the erasure of it2.
 
@R.MartinhoFernandes yeah, that's far simplier than what I wrote
 
@GamErix If I had a dime for every time I'd heard (or thought) that...
 
user1182183
i will compile what I have now and I'll report back, soon. xd
 
4:24 PM
@JerryCoffin People don't know what "harmony" means, it seems.
0
Q: Reinterpret_cast vs placement new

user1210290From reading this post, it is clear that placement news in c++ are used to call a class constructor on a pre-allocated memory location. In the case that the memory is already initialized, is a placement new or a reinterpret_cast more appropriate? For example, let's say I read a raw stream of b...

Oh gawd, that title alone.
 
Ah fuck.
 
"already initialized"
 
"Create a constructor that takes a flag telling the class not to initialize" waaah
 
If I understand the intent, I'd keep a priority_queue of (pointers/references) to players, sorted on last activity time. Update on activity. Periodically kick all that need it -- but not in the middle of other loops and such.
 
@CatPlusPlus Hehe.
@JerryCoffin But that won't bring harmony!
@CatPlusPlus What if he did that and an init() method for the cases when you don't initialize?
Wouldn't it be great?
 
4:29 PM
... creeping singleton ...
 
A singleton with an init()? Even better!
 
omg the pain: token = strtok((char*)dest.c_str(), PATH_SEPARATOR) //
 
What is happening today?
@chris Btw, are you the same chris that used to have a violin (or similar instrument) avatar?
 
It's not even December yet, they're early to the apocalypse
 
@R.MartinhoFernandes, Yes, now it's a tesseract.
The violin was actually the one they gave me, but I did used to play it, so I was like meh w/e
 
4:33 PM
Ok, just checking.
 
Wow, wireless in universities has brought not paying attention to new heights
5
Speaking of school, I love what college girls wear in the summertime
Combine that with a light breeze and, well, I hope you remembered to put on a clean pair of underpants, young lady.
 
@keith.layne Bikinis can make hot weather a lot more bearable. Presumably for those wearing them, but definitely for those watching.
 
I think that's discouraged during class, but I'll allow it.
 
LOL
 
From where I'm sitting, this is what I see: a girl mesmerized by reddit, homeboy next to me playing tetris battle, the guy with his back against the wall probably looking at porn, me here, and the rest of the class on Facebook.
 
4:40 PM
@R.MartinhoFernandes Amateurs. Obviously you need factory using dependency injection to give inversion of control. But maybe you're right too -- maybe the right answer is a singleton factory! (and since it manufactures singletons, you clearly need a factory for your singleton factories...)
 
user1182183
well I think I will just hook the Kick and Ban functions and ensure they don't disconnect the player before the loops actually finish...
 
user1182183
even checking if *i is between 0 and 1000 didn't help ; X
 
can I get 2 undeletes for: stackoverflow.com/q/11635281/168175 - I just wrote an answer and can't post it :(
 
@GamErix That sounds like at least a little bit of an improvement.
 
Too noob; didn't see.
 
4:42 PM
TN;DS is a new one for me
 
@Flexo done, + 1 more
 
@Flexo Post now!
 
And then we'll delete it again!
I need to clean my mind. Too much OSX today.
Time for some lovely Haskell.
 
@JerryCoffin thanks all, done
 
@GamErix auto it2 = it++ would help.
 
4:45 PM
@Flexo threw in an upvote to keep the OP from deleting again
 
@Flexo that answer doesn't remotely address the "how do I do this" of the question.
 
@Flexo, Sweet, I didn't know that was a likely possibility in TR2.
 
@MooingDuck it does address the "how do I do this" - it solves the real underlying problem.
 
@Flexo oh, right. XY. Nevermind then
 
Q: How do I do X with strtok?
A: You don't use strtok.
8
 
4:48 PM
That line I commented on was attrocious, though.
 
Q: How do I do X with strtok?
A: GFY
 
Using strtok right on a std::string's buffer?
 
isn't there a strtok alternative that saves state in an argument, and doesn't screw with the string?
probably not standard C though
 
linux.die.net/man/3/strtok char *strtok_r(char *str, const char *delim, char **saveptr);
 
@Prætorian It's in POSIX.
Maybe C11.
 
4:51 PM
4
Q: developed a strtok alternative

ant2009I have developed my own version of strtok. Just to practice the use of pointers. Can anyone see any limitations with this or anyway I can improve. void stvstrtok(const char *source, char *dest, const char token) { /* Search for the token. */ int i = 0; while(*source) { *de...

that guy spun his own
 
@R.MartinhoFernandes POSIX.1-2001
 
@MooingDuck still takes a char *, not a const char *
same as MS' strtok_s
 
@Prætorian ah, so it does
 
@n2liquid It's Mystic - i - al.
 
4:53 PM
oh shit
hey @Mysticial, your nickname is wrong, lol
 
@n2liquid It's intentional. Pronounced "Mysti-shull"
 
@Mysticial yeah, I'm just kidding :P
 
@R.MartinhoFernandes whoa, I never noticed that
 
@Prætorian Meh, his interface is still not good.
 
@n2liquid I've seen far worse than that...
 
4:55 PM
@Mysticial like what?
 
range<range<char>> tokenize(range<char>, char sep), preferably with templated char.
 
@n2liquid I've seen a few on 4chan...
where like the entire room was covered with stuff...
 
@R.MartinhoFernandes It's not even strtok. He's copying everything but the delimiter to some destination
 
@Mysticial oh yeah, of course, I just found this funny and wanted to share with somebody :P
btw this Michael Jackson action figure is just.. I don't know what to say
 
@R.MartinhoFernandes His interface is poor, and his implementation almost worse. Other than that, it's not too bad though.
 
4:57 PM
@R.MartinhoFernandes You need to be able to handle more than one delimiter
 
Oh god... I'm being serially upvoted...
 
@JerryCoffin I haven't even looked at the implementation.
 
hope it doesn't get reversed
 
Because strtok's main problem is the interface.
@Prætorian In that case, why not be able to handle multi-char delimiters?
Just go all the way and stick a regex there.
 
@Flexo ow... he didn't give you the tick
 
4:59 PM
@Mysticial Because the code he posted was completely unrelated to the question he was asking.
 
People don't realize when they've got a totally better solution in front of them.
 
@R.MartinhoFernandes The regex could be pretty handy. But that's beyond the scope of simple string tokenizing. I said you need to be able to handle more than one delimiter because strtok does that. So, if you're duplicating its functionality ...
 
@Mysticial I got the impression he was grumpy about being told strtok is wrong
 
@Flexo ah
 
I'll bet he doesn't change the (char*) cast or anything either
And then I'll laugh when his code has huge, random problems later.
 
5:00 PM
@Prætorian Oh, strtok does that? Ooops, nevermind then.
 
@R.MartinhoFernandes it did exactly answer "What I want is to throw an exception if the directory does not exist and it can't be created"
 
I wonder exactly how that serial voting script works. I've seen people get serial votes reversed with as few as 5 votes. But I've had a couple days where it's blatantly obvious that the same guy upvoted 10+ of my posts...
 
@Mysticial, rand() % 10 + 5
 
@Flexo Oh, my message was intended as what the OP might have thought. You know how some OPs are about being given advice.
 
I have often wondered why some one would serially upvote me
 
5:02 PM
@Mysticial Maybe he waited longer in between upvoting each of your posts. Since your posts are usually essays with benchmarks and what not, they take longer to read :)
 
@Prætorian That is definitely the case. On those two days, there were at least a few minutes between each upvote and they were only on my good answers. (aka, skipped my stupid x = x++, str==NULL, answers...)
 
If you had a question about throwing an exception, you should have omitted that big chunk of directory handling code and focused on the "throw an exception" part instead. That only wastes your (because you get answers you don't want) and everyone else's time (because they have to read irrelevant code and waste effort in answers that don't help). — R. Martinho Fernandes 7 secs ago
 
@Mysticial Okay, here's my question: if I serial-upvoted somebody, and those votes got rolled back, would those votes still count toward a Suffrage and/or Vox Populi badge?
 
@JerryCoffin yes
badges don't get removed unless it's a tag badge
or if a dev manually removes it
 
@Mysticial Interesting. Sounds like time for me to really get to work on that Vox Populi badge... :-)
 
5:14 PM
Only if you got the badge before rollback, though, probably.
 
@Mysticial Wait, tag badges can be removed?
 
@R.MartinhoFernandes yes
@JerryCoffin so you're gonna serially upvote someone?
I got it "normally".
 
Me! Me! Pick me!
 
I had a day where I felt like upvoting every single correct answer I ran into - basic or not.
 
What? How do I not have vox populi? I've reached max votes so many times now...
 
@Mysticial I dunno. I'm thinking about it though.
 
@JerryCoffin don't pick me. I heard somewhere that the serially voting script will undo all the votes cast by that person A to person B.
 
Pick me; you've probably never upvoted me anyway.
 
So it'll undo all the votes you've already cast on me.
 
Make a meta post titled "give me vox populi and then ban me". It'll be faster and will require less effort.
 
5:18 PM
Wut.
 
(No actually don't, don't let SO ban you from the chat.)
 
@CatPlusPlus Would getting rolled back actually get you banned?
 
Cat Plus Plus has removed an event from this room's schedule.
 
@CatPlusPlus I can see where that would make sense for an apparent sock-puppet account, but for an account that has a lot of other activity?
 
@JerryCoffin probably not, but I'm sure the mods/devs take a look at every single rollback that takes place.
 
5:20 PM
Gaming the game is bad, or something.
 
@Feeds No more making fun of?
 
It'd announce the damn thing over and over again every day.
I wonder if an event can last a week.
 
@CatPlusPlus You say that like it's a bad thing.
 
471 hotness on a serverfault question... nice
 
5:22 PM
Nah, capped at 24h.
 
Cat Plus Plus has removed an event from this room's schedule.
 
@Mysticial there's a "possible rollback war" automatic flag, but it takes more than one rollback to raise it.
you can trigger it on yourself though which is odd
 
Not that rollback.
 
@Flexo I'm talking about serial voting rollbacks.
 
@Mysticial oh sorry, missed that
 
5:23 PM
Holy Shit! Activity in the C Lounge! Call 911!
 
lol
 
Star my message please... it's amazing.. :-)
 
@JimNorton The room is always bustling this time of the day.
@JimNorton Nice try.
 
@Mysticial Oh I hadn't noticed.
 
@Mysticial Actually, looking at it I missed the fact that Vox Populi is only a bronze badge though. 40 votes seems like a lot of work for that.
 
5:25 PM
 
@JerryCoffin "too much work for a bronze badge" - lol
You already have electorate...
 
@FredOverflow is that his new series?
 
Breakthrough! Scientists discover fourth building block of nature! They are now: Protons, Neutrons, Electrons and Morons!
 
unfunny.
 
@Mysticial Yeah, but I never really tried to do that, other than (for a while) sort of keeping in mind that up-voting questions was a good idea. And besides, Electorate is gold...
 
5:28 PM
Oh, Sysadmin Appreciation day is this friday.
 
user784668
@EtiennedeMartel "Sysadmin Appreciation" lol
 
Hey, sysadmins get no respect.
When everything goes well, they're invisible, but when something goes wrong, it's their fault.
 
@JerryCoffin Yeah, all the one-time gold badges except for Unsung Hero can be worked towards.
 
@EtiennedeMartel Neither do plumbers -- and I'm pretty sure life without them would be a lot worse.
 
All the gold Answer/Question badges, they're mostly luck, but I suppose if you play them right it'll increase your chances.
 
5:30 PM
@keith.layne How can it be a new series if it's already at part 3? :)
 
@JerryCoffin Well, let's make a plumber appreciation day as well then.
 
@EtiennedeMartel Because they're stupid. Smart people know how to be invisible when things go wrong.
 
@FredOverflow curse you and your convenient definition of "new"!
 
On the other hand, star wars started with part 4, so...
 
@JerryCoffin For example: @Xeo's TMP answer is a good candidate to go 100+ if I reddited it. So I might do that in the future.
 
5:32 PM
@R.MartinhoFernandes He seems arrogant to me... I could be wrong.
 
ergo ipso facto I'm awesome per se
 
@R.MartinhoFernandes You are obviously not a sysadmin.
 
@EtiennedeMartel Hmm...and appreciation days for roofers, road workers, bug exterminators, ...?
 
@JerryCoffin For everyone! Except engineers. Fuck 'em.
 
@Mysticial Don't! If you do that I'll never again be able to crush his spirit by mentioning how he has no Great Answer badges.
 
5:34 PM
@R.MartinhoFernandes yeah...git...great answer :)
 
@Mysticial Given that it's already close to 80, I'd have to guess almost any extra publicity would push it over 100. For that matter, I'd guess it's mostly a matter of time before it happens anyway.
 
If it ever reaches 99, I'll downvote it!
 
@JerryCoffin Not necessarily, reddit has to like it. For example, my 4 flops question got reddited by my classmate back in December - nothing.
So I can't guarantee that reddit will like @Xeo's TMP question, but if they do... hehe
 
OH! EVENT!
 
@R.MartinhoFernandes I have two -- both on questions since deleted for being off topic (i.e., too fun) for the current SO, so neither one probably counts for much.
 
5:37 PM
Well, I've updated my question accordingly, but still haven't gotten a definitive answer:
6
Q: Tessellate a plane of points

DriseI have a file filled with 3d points. The points form a plane. Here is an example file: 25 1 -1 0 1 -0.5 0 1 0 0 1 0.5 0 1 1 0 0.5 -1 0 0.5 -0.5 0 0.5 0 0 0.5 0.5 0 0.5 1 0 0 -1 0 0 -0.5 0 0 0 0 0 0.5 0 0 1 0 -0.5 -1 0 -0.5 -0.5 0 -0.5 0 0 -0.5 0.5 0 -0.5 1 0 -1 -1 0 -1 -0.5 0 -1 0 0 -1 0.5 0 -1 ...

 
hello everyone :)
 
always crushed that this doesn't go to 100
 
@JerryCoffin Of the four I have one was deleted as well for those same reasons.
Bashing Perl turned out profitable.
 
@DeadMG That one seems more of a candidate for Hacker News than Reddit.
So if you feel like, try dropping it on Hacker News. You might get both Great Question and Publicist.
 
@FredOverflow A new one with STL, nice =D
 
5:39 PM
@R.MartinhoFernandes Profitable or not, bashing Perl is always a good thing.
 
@DeadMG Subtle.
 
I expect everyone here has already upvoted it
 
@Drise Greetings @Drise @DeadMG
 
@DeadMG I have indeed. Good question too.
@JimNorton Good day my friend!
 
@DeadMG I dunno -- it looks like it's up 3 since I glanced at it right when you posted the link (unless my memory is wrong, which is certainly possible).
 
5:40 PM
@DeadMG I did, VERY good question.
 
@DeadMG Yep. Back then when you posted it.
 
@DeadMG Some of them can take a while. I had an answer stuck at 90+ for 5 months.
 
@R.MartinhoFernandes As I expected.
@JerryCoffin Five, actually.
 
But it'll get there eventually.
 
maybe the Lounge population has changed more than I thought.
 
5:41 PM
@DeadMG I didn't.
 
@DeadMG Yup -- a couple more now.
 
huh
 
@DeadMG, I think I saw it and never upvoted :/ Maybe I was out for the day or something.
 
@DeadMG I think we can say we have a couple of semi-regulars now.
 
Against my better judgement, I have actually upvoted DeadMG before. I guess I'm the better man.
 
5:42 PM
I really didn't believe that there would be anyone here who had not already seen and upvoted it when it was first asked
it was pretty well linked to back then
 
I'm also crushed this question doesn't have more upvotes.
http://stackoverflow.com/questions/10319519/how-to-insert-synthetic-mouse-events-into-x11-input-queue
 
Also, the fact that our ownership methods needed to be changed is a clear sign the population changed.
@keith.layne lol
 
OMG!!1! Somebody could see puppy power in action and not be moved to vote!?!
 
What is this? Upvote begging day?
 
@R.MartinhoFernandes They did?
 
5:43 PM
@JimNorton You expect upvotes for a question about X? Good luck with that!
 
I didn't know of any change to the usual ownership semantics
 
m_cache and m_slostInfo are arrays, whats m_cache()/m_slostInfo() is doing? — Icebone1000 3 hours ago
 
@DeadMG Back then we just added whoever we thought was around often as owner. But that would make gazillions of owners, so we clipped that to whatever is on the "frequently in room" list.
 
^ I think that's a great question, illustrating what SO is all about.
 
oh, yeah, that was ages ago
I meant something a lot more recent
ever since we instituted that policy, there have been very few ownership changes
 
5:46 PM
@DeadMG When is that?
 
0
Q: C++ strtok need some help thanks

Baoky chenI use the following code and get the output below. Original string is -CCY 1.2624 Up 0.0006(0.05%) 01:37 [37] char* pch; pch = strtok (buffer," "); while (pch != NULL) { printf ("%s\n",pch); pch = strtok (NULL, " "); } This is my output CCY 1.2624 Up 0.0006(0.05%) 01:37 SG...

What is this? strtok day?
 
@R.MartinhoFernandes it's the same as with criminal acts. copy-cats. they're everywhere.
 
@EtiennedeMartel April first. The comments to the question make a minor joke about the fact that I asked a question on that day.
 
whats the event thats starting?
 
A lame joke.
The event "Now you see us" is about to end.
 
5:47 PM
oh xD
 
@R.MartinhoFernandes The summer-schoolers have reached chapter 5.
 
Hmm, that might explain it.
 
@JerryCoffin, Which book?
That was ch8 in the one we used I think.
 
probably schildt
 
@chris I haven't a clue. Like 97.3% of all statistics, I made that up on the spot.
 
5:51 PM
If you start a bounty to reward an answer, does it stick around in featured questions?
 
Yes.
It's silly, but "reward an existing answer" bounties can't be awarded immediately.
 
hey guys, is it still impossible for a class template to befriend a template parameter? like: template <class T> class Blah { friend class T; /* ... */ };
 
It's fine in C++11.
 
still as in "even after C++11"
oh, nice
good to know
 
GCC supports it since 4.7.
 
5:55 PM
In that case, have fun with your 100 @DeadMG.
 
MSVC did too, IIRC
@chris I wll when it gets there :P
 
You bountified it?
Hehe.
 
@chris That will definitely do it. :)
 
That should bring the extra juice.
 
5:56 PM
It's a good question, and answer.
 
Now he better serially upvote you in return. :)
 
lol
 

« first day (647 days earlier)      last day (4294 days later) »