« first day (671 days earlier)      last day (4276 days later) » 

9:02 AM
it worked fine when i issued the sql statement manually, sans "ADD PRIMARY KEY"
 
Xeo
@Nils The mailings itself aren't, but the papers are
for status on library proposals
 
@Xeo The papers are the mailings.
Hi.
 
Xeo
Whatever
 
it refuses to set primary key that does not include "activity-id" column
the only special thing about that column is that it's a foreign key
is that normal?
 
9:19 AM
not many database enthusiasts amoung the c++ crowd then
hm
 
Oh man, SQL this early in the morning?
-4
A: Closest point computation using compound data structures

user1606471int main(int argc, char *argv[]) { int i; int N = 10; d = 0.25; G = 1/d; grid = malloc2d(G+2, G+2); for (i = 0; i < G+2; i++) for (int j = 0; j < G+2; j++) grid[i][j] = 0; for (i = 0; i < N; i++) gridinsert(randFloat(), randFloat()); cout << cnt << " pai...

Delete?
AFAICS it's simply a part of the question copy-pasted.
 
Xeo
9:34 AM
Don't forget the free flagweight!
 
Umm, guys? Is anything wrong with protected specifier? Or protected data?
 
@sbi Oh, thanks for linking that. That was an awesome read.
 
Xeo
Except that it's not really useful?
 
specifier*
 
9:36 AM
-1 don't ever use protected data, it's as bad as private data. — rhalbersma 4 mins ago
@LuchianGrigore thanks
 
@BartekBanachewicz that guy's an idiot
 
He's got 3k+ rep anyway, so I thought I should check here
 
sbi
@R.MartinhoFernandes You dug through the whole reddit thread of 14k comments??
 
I mean... ok... I wouldn't call him an idiot for saying protected is bad....
whatever
but private?
 
But why protected is actually bad?
 
9:39 AM
@sbi A reasonably large swath of them (which for me means 10 or 20).
 
sbi
@LuchianGrigore While that might well be, he does have a point, though, if you assume he mistyped public as private. // @Bartek
 
@sbi private data is bad? :|
 
sbi
@LuchianGrigore He mistyped public as private.
 
But can any of you actually tell me what's wrong with protected data? In the example the OP gave he wanted to have accessors to derived ints. How could he do that other that by a protected access?
I mean, he could also give the accessors in the base classes and use them
But in this case it looks like an overkill
 
@BartekBanachewicz you can have accessors to private fields as well (in the same class)
But then again, accessors are as bad as public as well
 
9:43 AM
@LuchianGrigore But why you shouldn't use protected (in this particular case)?
 
Xeo
@BartekBanachewicz The same problems as with public data - pre-/postconditions, assertions, whatever
 
the case is greatly narrowed down
 
sbi
@LuchianGrigore eh yes Freudian slip: protected data is as bad as public data — rhalbersma 59 secs ago
 
the question is missing a lot of info
@sbi I saw that ;)
@BartekBanachewicz you can't really give a good answer unless you know the actual context
 
Xeo
You wouldn't want your innards to hang out of your body for anyone to fumble with, would you?
 
9:44 AM
the question describes a solution to an unknown problem, and is therefore not solvable.
 
he says there are common members
but you don't know the logic behind them
 
There might be a solution with only 3 classes, no inheritance. Or not.
 
or whether they are actually common or just share the same name and type
 
Noboby knows.
 
Duh. So my answer could be equally good (or bad) as all the others. Still, I get downvoted. Epic.
 
sbi
9:45 AM
@BartekBanachewicz There's no real conceptual difference between setters/getters and directly accessing data. (idinews.com/quasiClass.pdf)
 
you don't know whether to use inheritance or composition
or neither
or both
 
@sbi What about "possible control in the future" and less code changes when using accessors?
 
Xeo
@BartekBanachewicz Your data should only be manipulated by your class in a way that makes sense. Aka, your class does stuff, that's what it's for, and whatever data it needs to accomplish that is not of interest
 
@LuchianGrigore I proposed a solution. It clearly states the OP should refine his requirements. Still, I get downvoted, because some other guy thinks he guessed better
 
@BartekBanachewicz in a good enough design, you wouldn't need accessors. Why would you need to see the members of a class? Why would you care how it works, as long as it does?
 
sbi
9:47 AM
@BartekBanachewicz The problem is accessing the data in the first place, not whether you do this through some accessors or directly. Usually, there's something wrong with your design if you need to access a class' private state.
 
@BartekBanachewicz I agree, the downvote was harsh
but you probably should have posted a comment asking for clarifications instead ;)
 
Xeo
You could say that std::vector::size and std::vector::resize are accessors to the size of th e vector, which is true, but resize also changes the internal array
 
You're presenting your solution for a problem that might be solved in a completely different way. In its current form, this is unanswerable. — rubenvb 7 secs ago
there, I said it.
 
Xeo
If you could directly set the size through a member, you'd get problems.
 
Everybody was thinking it, I said it.
 
9:48 AM
@rubenvb someone had to.
 
Xeo
It's a conceptual difference between simple getters/setters and operations on an object that change the internal data
 
@BartekBanachewicz you can of course guess for some questions, but in this case it's quite impossible. And possibly misleading. Probably misleading.
 
A class without invariants (i.e. a tuple with named elements) can, and probably should, have everything public. A class with invariants should have as little public data members as possible.
And most classes are useful for their invariants, not their data.
 
@LuchianGrigore Ok, but just to clarify, my answer weren't precisely wrong
 
Xeo
@R.MartinhoFernandes "invariants" was the word I couldn't remember, thanks
 
9:50 AM
@BartekBanachewicz now that I think about it, it probably is. No wronger than the others though, if that makes you feel any better.
@BartekBanachewicz the reason it's wrong is because it presents a viable solution to an unknown problem.
and that solution might be flawed
 
@LuchianGrigore "a viable solution to an unknown problem." that's what I wanted, actually. I'm not deleting it, then
 
@BartekBanachewicz you don't get it.
@BartekBanachewicz viable doesn't mean good. It might appear to work, but it could be damaging.
 
You set it.
 
Gosh. When/If OP clarifies what he wants, I will delete it if it's wrong in the context. But right now, it's in superposition.
It's just I rarely lose confidence IRL, but here, I can't be sure - statistically most of the people know better than me. Still, if I think I can give information that could help OP as answer, I post answer. But then, who should I listen to when it comes to judging if it's any good?
 
@BartekBanachewicz My car's engine heats up. What do I do? Would you tell me to add water? Some oil? Sure, either of those would cool down the engine, but in fact it's the <*mechanics term here*> that's broken, and by not changing it in time I'll do even more damage to the car. Just because you pretended to be a mechanic and I took your advice, which coincidentally and for the moment cooled the engine down, but in fact destroyed my car.
2
Thanks a lot! Now I need a new car.
 
Xeo
9:56 AM
@LuchianGrigore I'd wrap the <mechanics term here>
 
sbi
@Xeo No, they are methods to obtain informations about the object or change its state. std::vector doesn't necessarily have to store the size. It's a conceptual idea, rather than a must-have data element.
 
@LuchianGrigore Do you suggest I shouldn't post anything until I'm 100% completely sure? Because most of people below 1k can't/don't clarify their problem well enough.
 
Xeo
@sbi I never said that, did I?
@BartekBanachewicz Don't answer such questions
 
sbi
@Xeo You said one could say this, and I oppose that.
 
Xeo
You can get the size of the vector through end-begin, I never implied it has to be there as an actual data member
 
9:58 AM
@BartekBanachewicz I didn't say that.
 
@Xeo I won't have many to answer, then. On the good questions, there are just too many people faster, better, and more accurate than me.
 
@LuchianGrigore Oh gawd, don't add oil when your engine is heating up.
 
sbi
@BartekBanachewicz Answer to what you know, rather than to what you think the problem is. If you don't know what the problem is, say that (in a comment).
 
@R.MartinhoFernandes I did that once. And it did cool it down :)
 
Xeo
@BartekBanachewicz Learn to type faster, better, more accurate. ;)
Or, ask questions!
I got a lot of my early rep from questions, IIRC
@R.MartinhoFernandes Oil is great for cooling stuff down
 
10:00 AM
@Xeo Car oil isn't designed to work as a coolant.
 
Xeo
@R.MartinhoFernandes Who talked about car oil? :D
 
WTF kind of oil are you adding to your car engine?
 
@sbi @BartekBanachewicz Unless the problem is a LNK20XX which you can guess the solution to because you know that templates must have implementations in headers, and you can be 99% sure, although the op didn't give any code ;)
 
@sbi Well, I guess my disclaimer wasn't enough. OK, this advice seems sensible.
 
@R.MartinhoFernandes ofc it's not.BUT it did work. Got me home. :)
There was something else wrong with the car which I had fixed afterwards.
 
10:02 AM
All of it, actually. Thank code I discovered The Lounge
 
But it was a great workaround.
 
sbi
@R.MartinhoFernandes Without oil, an engine would get very hot very soon.
 
@sbi Still, it's the water or air that's actually cooling the engine. (water with some stuff, doesnt matter)
 
Xeo
@sbi I don't know, my psychic debugging powers helped me once or twice
 
My old car (not this exact one)
 
10:04 AM
@LuchianGrigore Oh I don't deny that it worked. But it works better if you add a proper coolant.
 
@Xeo So is it OK if you actually put the giant disclaimer "I'm guessing right now" (just after "Clarify what you want(FFS)")
 
sbi
@Xeo Yeah, we all had some like these. But those are (usually) lucky streaks, and there's at least as many where we've been wrong. And we never wondered when those were downvoted. // @Bartek
 
@BartekBanachewicz there's guesses, and the there's guesses :)
 
@sbi Got the point. "Now that I know", right?
 
@sbi why do you comment him out?
 
sbi
10:06 AM
@LuchianGrigore To the contrary, I add him as a comment.
 
sbi
@BartekBanachewicz Basically, it boils down to "it's Ok if it turns out you were right", but don't whine about getting bashed when you were wrong.
 
@LuchianGrigore Obligatory xkcd reference:
 
Shouldn't std::iterator_traits<TemplateParameterThatTurnsOutToBeInt>::value_type SFINAE?
 
10:10 AM
@sbi Being wrong motivates me to study harded for the next answer next time. It's not that I feel personally offended by a downvote, I just didn't agree with this particular one.
Now I kind of do agree. Not with the "protected sucks" parth though
 
@R.MartinhoFernandes in the right context, it will.
 
Call me old-fashioned, but I never agree with any of the downvotes I get. Even when they're well deserved.
 
Xeo
@R.MartinhoFernandes That again?
 
Ugh, then it's GCC acting up.
Ah, works on 4.7.
 
Xeo
Context?
 
10:12 AM
@R.MartinhoFernandes to SFINAE, verb, SFINAEs, SFINAEed. 1. to Substitute Failingly Is Not An Error (<- does not make any sense whatsoever)
 
@rubenvb cause a substitution failure if used in a context where Said Failure Is Not An Error.
 
@R.MartinhoFernandes yeah, I know, you just need to invent a verb acronym for that though?
oh
dang
lol
 
how do I declare platform-independent 64-bit signed integer?
 
@all Are you guys first overall in some tag?
 
10:15 AM
std::int64_t from <cstdint>
 
@R.MartinhoFernandes I'm not sure. Primary template is in terms of using value_type = typename T::value_type;.
 
@LucDanton Well, and won't it be a SF there?
 
lol
You have no idea of the idiocy of these people. :) — subi211 1 min ago
 
sbi
@BartekBanachewicz But protected data does suck. If another class needs access to your class' innards, then your class isn't high enough an abstraction to be a class on its own.
 
IOW lacks invariants!
 
10:17 AM
@sbi I guess it's in the contradiction with the interfaces actually
 
@R.MartinhoFernandes Yes.
 
Xeo
@LuchianGrigore Since I only lurk in C++ related tags, nah
 
Took me another reading.
 
Protected is a bit of a maintenance weirdness. It turns your class into a schizophrenic fool with two different interfaces.
So now you're maintaining not only the public interface, but also the protected one. And they have completely different clients.
 
Xeo
@R.MartinhoFernandes Works, what's the problem? :D
 
10:18 AM
@Xeo Doesn't work on 4.6.
 
@Xeo sbi is first in something :)
 
@R.MartinhoFernandes that's not a problem. It's a workaroundable fact.
 
@rubenvb Well, someone needs a workaround. awaiting link
 
Xeo
@R.MartinhoFernandes lol
 
10:20 AM
@R.MartinhoFernandes gj :)
 
@R.MartinhoFernandes use GCC 4.7. Duh. I never said you could/should workaround in code.
 
Xeo
@R.MartinhoFernandes What does <iterator> say about the definition of the unspecialized iterator_traits?
 
@R.MartinhoFernandes presumably now we can just return std::true_type or std::false_type and use decltype?
rather than messing around with struct { char[2] }
 
@ecatmur Yes, that's what I use. But this is for C++03.
 
@Xeo Defers everything to the template parameter.
 
10:21 AM
@LuchianGrigore doesn't sound as ridiculous.
 
Xeo
@ecatmur I always used typedef char (&No)[2];
 
@R.MartinhoFernandes For C++03, but you need gcc 4.7 to be able to run it? :p
 
@R.MartinhoFernandes I remember that one. You drew the pictures with the hand-made stars, right?
 
@ecatmur That's why I need a workaround (I know one, but I was expecting someone to do the typing for me. I feel reaaaaally lazy today).
@LuchianGrigore Yeah.
 
wow, C++11 really does make type traits much easier to write: liveworkspace.org/code/d845e8e11cd38b3132b1490400cbe43f
 
10:25 AM
@ecatmur That's still stupid. You don't even need the ::value at the "call" site.
 
@rubenvb Yes, you do.
You can't typedef bools; only types.
 
yes, but with template aliases you can remove the need to type ::value and just use IsInteger<T>() directly as a metafunction
 
@ecatmur You might want to consider using template<typename T> struct is_iterator: decltype(evaluateIsIter<T>(0)) {};.
IIRC the benefits are somewhat better diagnostics.
You get a unique trait name in the template instantiation stack instead of std::true_type/std::false_type everywhere.
 
Xeo
@rubenvb No?
You have constexpr functions for that, but not template aliases
 
10:28 AM
lol I answered a message below the one answering it
oh, well yeah
 
@rubenvb You know that's kinda silly, don't you?
 
@R.MartinhoFernandes why is that? IMHO it makes "user" code a lot cleaner
 
@Xeo template aliases used for type transformations: github.com/rubenvb/KISS/blob/master/include/types.hxx#L372
 
I'm out
gn all
 
10:29 AM
@rubenvb All integral constants have implicit conversions to their values.
 
@LucDanton ah very good point thx.
 
All those functions are redundant.
 
@R.MartinhoFernandes yet everyone types ::value. Why is that then?
 
@rubenvb Habit.
 
@R.MartinhoFernandes huh.
 
10:30 AM
And implicit conversion ickiness, maybe.
 
Xeo
@R.MartinhoFernandes Sadly, template<bool B> struct bool_; bool_<std::true_type{}> doesn't work :(
 
@R.MartinhoFernandes this doesn't work: liveworkspace.org/code/9e5dfac984fb4c62d5812c3ad1206b91
 
Xeo
@rubenvb The same reason people type typename std::a_trait<T>::type() for tag dispatching instead of std::a_trait<T>()
 
@rubenvb Anyway, most of the time I don't really type ::value. Pretty much only on building blocks.
 
Xeo
@rubenvb That's a type
Do IsIterator<int>()
 
10:32 AM
@Xeo there's that tag dispatching again. :) You explained this to me once before. I'll need some more time to see its use.
 
kk
gotcha
 
Xeo
4
A: Template method enable_if specialization

rhalbersmaSFINAE does not work on non-template functions (member or non-member). As Kerrek SB points out, making them non-member function templates will work. Or as Xeo points out, making them member function templates with a defaulted template argument will also work. However, this is only working bec...

Also, stdlib <algorithm> and std::advance etc
 
Tag dispatching is an alternative to SFINAE. It's not a complete replacement, though.
 
Template wankery.
@R.MartinhoFernandes did you get around to Ambrosia yesterday? Although your lazy mood today might give me a hint as to what the answer to that question is...
 
10:36 AM
@rubenvb Friends showed up, and I... changed plans. :P
 
@R.MartinhoFernandes I knew it :P
 
Xeo
Alright, time to see if I can get myself some admin rights on this PC
see ya later
 
Even though those bastards didn't deserve the pleasure of my presence. Cancelling game night should be a bananable offence.
 
lol
 
@R.MartinhoFernandes I don't think it should work.
The standard says:
> Only invalid types and expressions in the immediate context of
the function type and its template parameter types can result in a deduction failure. [ Note: The evaluation
of the substituted types and expressions can result in side effects such as the instantiation of class template
specializations and/or function template specializations, the generation of implicitly-defined functions, etc.
Such side effects are not in the “immediate context” and can result in the program being ill-formed. —end
 
Ugh. That's nasty.
(And broken-ish, I'd say)
 
sbi
15 more rep, and not even Jon Skeet could be more evil than I am.
 
sbi
@R.MartinhoFernandes I said: "15 more rep, and not even Jon Skeet could be more evil than I am."
 
11:11 AM
Oh thanks, that explains everything.
 
sbi
@R.MartinhoFernandes Aren't you a robot? Sigh. My rep will be 66,666 then. Jon isn't even past 500,000 so it will take a while before he reaches 666,666.
 
@R.MartinhoFernandes hey
do you have the VS 2012 RC installed still?
 
I never did.
 
aw.
does anyone else still have it installed?
 
sbi
WTF? There's a tag?
 
11:18 AM
@sbi Well... all those porn sites won't write themselves.
 
sbi
Oh, someone upvoted an answer of mine. Now one more question upvote, please...
 
@sbi Go ahead, take the screenshot.
 
sbi
Wow, thanks!
@R.MartinhoFernandes Done!
user image
4
 
awww
the ape's got a magic number
 
Ha, now we can see your real name!
Oh, wait.
 
11:29 AM
No you can't
 
sbi
@R.MartinhoFernandes Yeah, I erased that.
But then, the two of you know my real name.
 
only two of us?
wow, you've done a good job keeping it secret
most regulars here now my real name by now.
 
sbi
Nah, I think it's three or four of the regulars here.
 
Tony Lionitsk.
 
sbi
11:31 AM
@R.MartinhoFernandes Yeah, but before he married, he was Toni Tigritsk.
 
hahah
man, I'm so tired today
 
0
A: Destructor not called when object on stack is overwritten

Cheers and hth. - AlfRegarding the in-practice behavior, the statement obj = test(4); changes the value of the id member to 4. Consequently, when that object is destroyed, it reports that the object with id 4 is destroyed. The assignment performs a memberwise assignment because you haven't defined the copy ass...

^ Some UB pointed out. Should this be a FAQ? It is certainly not uncommon!
 
@sbi gamedev.SE.com has exactly 666 pages of questions :)
 
sbi
@melak47 Well, we all know that gaming is evil. But did you know I am evil, too?
 
@R.MartinhoFernandes Ha, got it. Look at liveworkspace.org/code/9f3c35ea9283ebb5593bdf8061796f4f
 
11:41 AM
@sbi I think you know what that means. You should make a game!
 
sbi
@melak47 I don't write games.
 
@sbi Actions speak louder than words. Even evil actions.
 
@sbi ...yet
 
gcc.gnu.org/onlinedocs/gcc-4.7.1/libstdc++/api/… - gcc-4.7.1 defines an empty iterator_traits for non-iterators
So your code can't work.
 
sbi
11:42 AM
@R.MartinhoFernandes Better now?
 
That's mean. Not evil.
 
sbi
@melak47 Well, yeah, so far I haven't (except for some toy stuff), and right now I don't feel like.
 
@sbi guess we'll have to wait til 666,666 rep?
 
@ecatmur I think that's how it should be (it's the most useful choice IMO). But not how the standard specifies it :(
 
sbi
@R.MartinhoFernandes I am of the grey meanies. Isn't that evil? (And who gets that reference?)
 
11:44 AM
@R.MartinhoFernandes hey, you just need to get has_iterator_category instead. There's your workaround.
 
sbi
30 mins ago, by sbi
@R.MartinhoFernandes Aren't you a robot? Sigh. My rep will be 66,666 then. Jon isn't even past 500,000 so it will take a while before he reaches 666,666.
 
@ecatmur Argdh,h fsck. This is all broken.
 
@R.MartinhoFernandes oh wait, no that won't work :(
You're just going to have to do the hard work yourself.
 
C++ Primer 5th edition pdf out? D:
 
@close-voters: you're wrong. asking whether Java has "pointers" (yes, the Java language specification says so) is very different from asking whether has "same thing like C++ pointer (no, it doesn't). Get a grip. The answers are directly opposite, it's no duplicate. — Cheers and hth. - Alf 39 secs ago
^ Needs 4 more votes to reopen.
I think that on principle, questions that are incorrectly closed as duplicates should be reopened.
Even if only for closing them for other reasons (not sure if that applies here though).
 
11:48 AM
@R.MartinhoFernandes But I think an iterator must have iterator_category or be a pointer, so you should be OK
 
Also, @sbi, you're the man re discussions in grey territory (meta): shouldn't the requirements for closing be tightened a bit, like, one must demonstrate a least basic knowledge in the relevant tags, or something?
 
sbi
@Cheersandhth.-Alf What? Me a meta guy? If anything, I am the meta cops' nemesis.
 
Pointer arithmetic is evil.
 
@sbi yeah, but you're good at browbeating them ;-)
 
sbi
@Cheersandhth.-Alf If you propose some mechanism requiring some rep in a tag before closing a question in said tag, and if that proposal makes sense, I'd certainly upvote it. However, it will be hard to come up with something sensible there. For starters, most questions have several tags. How do you deal with that? And what if I edit the question to contain only [tag:my_own], in which I am the only with enough rep, and then close the question? Nobody can then reopen it...
 
11:55 AM
And you often do not need any but the most basic common sense to close most questions IMHO. There are exceptions.
By the way, the question is a near-exact dupe of this:
7
Q: Does Java have Pointers?

arunaIf Java does not have pointers then what does the the new keyword do in Java? I am confused, please explain.

and has a lot more explanations than your answer on the -8 badly asked and awfully spelled question.
 
do i have to include <cstring> to use string literals?
???
 
@MohamedAhmedNabil have you tried?
@MohamedAhmedNabil And don't do that.
 
im on the go right now
Not using my laptop
and was just wondering
 
Xeo
Yay, home
@R.MartinhoFernandes what was your problem again?
 
@R.MartinhoFernandes
 
12:05 PM
Have you seen Phabricator?
 
@sbi you mean, you answered more questions than Jon Skeet?!
@CatPlusPlus Is it a Zinglethon?
 
sbi
@sehe Nope.
 
Motivate me to go and finally buy a new router. I'm currently bombarded by stupid port scanners and I miss my precious NAT.
 
Don't buy a new router.
 
12:13 PM
guys what do you think
should using namespace std; be global or local
 
Xeo
@MohamedAhmedNabil It should be nowhere
 
@rubenvb no, the answers are exactly opposite (yes and no), so it cannot logically be any kind of dupe, much less "near eaxact dupe". in other words, that's rubbish.
 
@CatPlusPlus what kind of router do you have?
 
@Xeo local is okay by me. Very local. As in function or block scope
 
Xeo
12:14 PM
@sehe Really, 5 characters? :)
 
@melak47 One that couldn't handle 10Mbps connection, let alone 60.
That's why I'm plugged directly to the modem now.
 
@CatPlusPlus neat
 
@Xeo times x
 
Yuck.
 
Xeo
114
Q: Why is 'using namespace std;' considered a bad practice in C++?

ManaOkay, sorry for the simplistic question, but this has been bugging me ever since I finished high school C++ last year. I've been told by others on numerous occasions that my teacher was wrong in saying that we should have using namespace std; in our programs, and that std::cout and std::cin are m...

 
12:16 PM
@Xeo Who said I'm stupid and go for petty syntactic win? I hardly ever do using anything. But I sure do using namespace qi; inside my Spirit Grammar's constructors :)
 
Never use using namespace std
 
@CatPlusPlus There is no valid reason to prohibit at the most local of scopes. Use common sense instead
 
Xeo
@sehe Really, not just namespace qi = boost:spirit::qi;?
 
Alias, don't flatten.
 
@Xeo Duh. How on earth would you be able to do using namespace qi; otherwise?
 
Xeo
12:18 PM
@sehe Maybe you didn't want to type boost::spirit::qi for the message :P
 
@CatPlusPlus I don't flatten. I pull in names, at the appropriate places only.
Like I said, I only do so if it adds greatly to readability
@Xeo Huh. Why would I be lazier in chat than in code? I write more code
 
Xeo
who knows
 
:)
 
can i limit the amount of charecters that a std::string variable stores?
 
@MohamedAhmedNabil str.resize();...
 
12:20 PM
the str.resize() function is included in the <string> directive?
 
But if you want real limits, std::array<char, max>; - You'll have to administer the length separately though (unless you want to use NUL-termination e.g.)
@MohamedAhmedNabil header, yes
 
@sehe one more thing, Whats the difference between a directive and a header
 
Resize resizes an existing container.
 
Xeo
@MohamedAhmedNabil I think you need a good book
 
8
A: std::string.resize() and std::string.length()

David Rodríguez - dribeasWith the current standard (the upcomming standard differs here) there is no guarantee that the internal memory buffer managed by the std::string will be contiguous, or that the .c_str() method returns a pointer to the internal data representation (the implementation is allowed to generate a conti...

 
12:21 PM
Is it even possible not to include all the methods of an included class/structure ?!
 
@MohamedAhmedNabil A directive is a 'preprocessor command' (like #if or #include)
@MohamedAhmedNabil The header is the file (actually, source code) that gets included.
 
Xeo
@ereOn /* in header foo.h */ struct foo; :)
 
@ereOn a.k.a. 'forward declare'
 
@Xeo: Nice one ;) And what about just some of them ?
 
Xeo
Nope
 
12:22 PM
There are no half-complete types.
 
Xeo
If you have a defined class, you get all the member function declarations
 
It's either fully complete or fully incomplete.
 
I actually and hopefully knew about the forward declarations, was just asking because sometimes people have clever tricks to do things I would think are not possible.
(Not necessarily "good" things)
 
after the issues with uninstalling MS SQL server 2008, I figured I'd remove the one VS 2012 installed without asking me. turns out it needs that for intellisense >_>
 
Visual Studio uses SQL Server Compact for IS.
 
12:27 PM
@sehe so #include<string> is a directive but <string> is a header?
 
yup. I guess I was a bit overzealous with uninstalling those :p
 
sbi
> Moving red laser beams scare away potential intruders. Laser beams move along floor and wall 180 degrees. Easy to install, 110v comes on automatically w/timer. — Bruce Schneier
> It's all fun and games until your cat dies of exhaustion. — Kahomono
4
 
@MohamedAhmedNabil: string is a header (file)name. <string> is a header (file)name surrounded with < >
 
@MooingDuck nope. :(
 
sbi
1 message moved to bin
 
12:38 PM
@AmberArroway: Neither of your links are clickable or complete.
Also, I'm not sure you should advertise for your questions.
 
http://cs.auckland.ac.nz/courses/compsci335s2c/tutorials/mano/WirelessBitmaps.pdf

http://stackoverflow.com/questions/11927391/how-to-convert-wbmp-to-png

noone helping me in C# chat
 
@AmberArroway shut up.
 
sbi
@ereOn If you're not sure, read the Code of Conduct.
 
@sbi: Perhaps it's a translation thing, but to me my sentence had the following intent : "Don't advertise for your questions"
 
12:40 PM
I still haven’t started on rewriting Git in C++; Trollvalds scares me.
 
sbi
@AmberArroway And thus you come to the C++ room with a C# question? How about you start thinking about why they're not helping?
@ereOn Being a furriner myself, if there was such a meaning in it, it escaped me.
 
@sbi fantastic!
 
@sbi: Do ironic/sarcastic sentences have different construction rules in english compared to other languages (in this case : french) ? (that is a real question)
 
sbi
@sehe Yeah, I literally LOL'ed. I had to explain it to the two guys I share this office with.
 
@sbi what twitter client are you using now. Oh wait, tweetdeck or something?
 
sbi
12:47 PM
@sehe Right now I'm at work and just use the website. On my phone, I use TweetCaster.
 
@sbi The amazon page has a troll 1-star review on it:
> I recently bought one of these as I don't exactly live in a select neighbourhood. It arrived promptly and the instructions were very easy to follow and I had it setup in no time at all, the problems started when I turned it on. I had somewhat of a shock when the laser beam was directed straight into my eyes which immediately blinded me, after stumbling backwards and tripping over the cat ...
> I hit my head on the wooden table behind which promptly rendered me unconscious. I awoke some time later to find most of the contents of my flat had been removed.
 
sbi
LOL!
 

« first day (671 days earlier)      last day (4276 days later) »