« first day (663 days earlier)      last day (4291 days later) » 

12:00 AM
Wow, the C standard has a list of common extensions as an appendix.
 
It finished compiling! 16 minutes, for that one project
 
now clean it!
 
@MooingDuck You should be sad. Now you have to work.
 
@R.MartinhoFernandes I am :(
 
meh work
 
12:02 AM
@R.MartinhoFernandes That was only one project of five.
 
Oh. Carry on.
 
lol
I have to get up at 7 tomo, but since I went to bed early last night, got up early this morning and had fairly decent amount of sleep, I'm not tired right now
should I go to bed or not?
 
Yes.
No.
Maybe.
Bananas.
 
grapefruit
 
Ell
anyone seen gooseberry boards?
 
12:04 AM
WTF is that?
 
Ell
its a £40 board with an a10 processor and a 400mzh gpu of some kind
about 3x faster than a rasp. pi
 
Anyway, here's my advice from experience: don't decide to pull an all-nighter if you're not 240% certain you won't get sleepy near the end.
 
Ell
also has 1gb of ram
pretty good for £40 I'd say. runs android 4, but ubuntu & arch soon, i think
 
Because then you'll decide to "just rest a little laying down in bed" and instead end up "sleeping until sunset and missing that important exam thingy".
Not that that ever happened to me or anything. whistles
@Ell I think Android is a terrible OS for PCs.
 
Ell
the board is actually a tablet board
 
12:07 AM
It always amazes me when people complain about how id Software games suck. No shit! They write 3D game engines, not games... really.
 
Well they write games, but really only to show off the engines.
 
Ell
I don't think the goooseberry is like a pi in that its open source, I think its a chinese made board whos schematics have just been brought to attention
 
@R.MartinhoFernandes lol
 
Ell
but still its pretty good
 
12:09 AM
No I think the real tablet board is the PandaBoard.
 
Ell
too expensive imho
 
Perhaps even the BeagleBoard.
I can't see buying a tablet with a single 400mz core CPU.
 
Oh wait.. that's the GPU.
What is the CPU?
 
Ell
erm 1 GHz default clock, can overclock to 1.5 GHz with the most stable oc being 1.2 GHz
 
12:12 AM
Yeah, that's not bad for the money.
 
Ell
anwyay I'm off now
 
cya
 
Ell
night :)
 
so if in Visual Studio I add a include path "./" to a project that is in the folder "P", and add a file to that project that resides in folder "H", what folder does "./" refer to?
 
P
But you know what they say....
If you want to gamble and maybe get a useful answer, maybe get a good answer, and maybe waste your time, feel free to ask questions here :)
 
12:25 AM
@LuchianGrigore I can't figure out why it's including headers with the same name in H instead of the ones in P .
 
. is relative to wherever the build command is run.
 
@LuchianGrigore its a question with a one letter answer. I'll risk it
 
:))
AFAIK, ./ is the current folder
"current", as in it doesn't go up
 
@LuchianGrigore well, yes, but I was trying to figure out which was the "current folder"
 
Is an enum aligned?
It only has 6 value...
 
12:35 AM
it has alignment of underlying type
 
@Cheersandhth.-Alf so, in this case, no...
I was afraid of that...
 
probably the underlying type is int
unless it has been specified
 
@Cheersandhth.-Alf isn't it the minimum? I mean, if a byte can hold all values, isn't it byte?
 
Scoped enums are int by default.
Unscoped enums are whatever the compiler wants.
 
it's up to the compiler, but in practice no
you can check the underlying type via std::blahblah something, I don't recall: as yet works not in visual c++ but i posted a workaround here on SO
 
12:39 AM
Oh, can I see it? I used a workaround in GCC as well.
10
A: How do I get the fundamental type of an enum?

R. Martinho Fernandesstd::underlying_type is available in GCC 4.7, but until then you can get an approximate emulation with templates: #include <tuple> // This is a hack because GCC 4.6 does not support std::underlying_type yet. // A specialization for each enum is preferred namespace detail { template <...

 
he he you can do that much simpler :-)
 
Meh...
 
@Cheersandhth.-Alf Show me!
 
2
A: How to know underlying type of class enum (C++11x)

Cheers and hth. - AlfBoth Visual C++ 10.0 and MinGW g++ 4.6.1 lack std::underlying_type, but both accept this code: template< class TpEnum > struct UnderlyingType { typedef typename conditional< TpEnum( -1 ) < TpEnum( 0 ), typename make_signed< TpEnum >::type, typename m...

 
lol, C++11x.
 
12:43 AM
oh
he he
old habits die hard iv
 
Oh. make_signed does that?
 
yep
it makes it a bit mysterious why they lack the std::underlying_type
 
"That makes your class not working with non-default constructible types" This is not true, though. The standard seems to indicate that automatic initialization and destruction are suppressed for members of unions. — keveman 9 mins ago
Is this true?
 
dunno
sry
good night everybody
 
12:51 AM
Have fun.
 
1:07 AM
@Luc Hey, have you considered an union for the storage of an optional? stackoverflow.com/q/11875045/46642 It seems unions can do the object/no-object dance with all the new changes they got: unions basically suppress initialisation and destruction.
Not particularly an improvement, but quite neat, I think.
 
1:34 AM
I have a bus to catch at 4:30am... how fucked up is that?
someone's been spamming the PHP room...
 
Is there a similar function like malloc in c++ ? If yes then how can I re-write this in c++ int* pi;
int size = 5;
pi = (int*)malloc(size * sizeof(int));void free(void *ptr);
 
std::vector<int> pi(size);
 
hmm I don't understand >.<
 
1:49 AM
I don't recommend attempting to convert C code to C++ if you don't know C++ well yet.
That goes for any pair of languages, actually.
Porting code line-by-line results in very poor code.
Also, if you're doing it like a machine (read line; replace every function with equivalent in target language; write line), why isn't a machine doing it for you?
 
the problem I am facing now is that I need to make a program where I accept a stream of numbers from user and store them in array. Since I don't know how many numbers the user is going to enter I cannot create the array
 
That's what std::vector<int> is.
An array that grows as you need.
 
This is a silly question but in an article it says "The basic point is that you should not mix scalar new with vector delete and vice versa." My question is what is scalar and vector and what values can they have ?
 
I guess "scalar new" is new and "vector delete" is delete[]. That's a confusing choice of names.
You cannot mix them simply because it's not allowed.
But you shouldn't even use them, because those are advanced features for very specialised use cases.
(And by "you", I mean programmers in general)
new creates an object with dynamic storage duration. delete destroys an object created with new. new[] creates an array of objects with dynamic storage duration. delete[] destroys an array of objects created with new[]. Mixing the two makes no sense.
 
When is recommend to use dynamic storage and automatic storage duration? Is it ok if I use only automatic storage? Based on the answer of @R.MartinhoFernandes
 
2:03 AM
I understand it better now ^^.Thank you
 
@VictorHugo Yes, it's perfectly fine.
It's actually desirable, but some situations call for dynamic storage.
Polymorphic classes are probably the most common.
 
+1 for that answer, it was an interesting comic
 
user1182183
hey everyone, can anybody post me the link where mooingduck posted how to learn lua in a few lines of code?
 
user1182183
I don't rly know how to use all the features of this chat : P
 
Jul 31 at 23:14, by Mooing Duck
@LuchianGrigore http://ideone.com/ZBv1K read this, and you know the lua language (everything else is the library)
This?
 
user1182183
2:11 AM
ye and he posted a second link later
 
user1182183
with some additional stuff
 
user1182183
thank you so much
 
You can find the second link if you scroll a bit down.
 
user1182183
ah that's the same link ; D
 
He probably edited it and reposted to mention that.
 
user1182183
2:14 AM
Yeah ^^ btw lol I'm at discussion with my friend how fast you can learn certain programming/scripting languages, lua really fast
 
user1182183
an he says C++ syntax in 20-30 lines,
 
user1182183
I say NO WAY
 
user1182183
gimme some super uber hard code to show
 
user1182183
XD
 
user1182183
you guys here always pawn with those <T> TEMPLETE:$^&*^%$#@#$%^ stuff
 
user1182183
2:15 AM
show some xD
 
int main(){ ((void (*)())0)(); }
 
It's quite readable though.
 
user1182183
thanks : P
 
user1182183
if there will be any funny or descent reaction I will post the skype quote here
 
Mother of SFINAE
 
user1182183
2:18 AM
xd
 
@R.MartinhoFernandes in your How to Answer (You need to pass a pointer to it to delete in order to clean it up) in the second comic strip you say "it gets cleaned up later in the day". Does that mean the memory gets cleaned before shutdown or after a specific time interval ?
 
@Failed_Noob That is on the pointer. The pointer is cleaned up automatically when its scope ends (be it a function, or a loop body, or a branch on an if).
The object it points to needs to be cleaned up with delete.
Because the pointer has automatic storage duration, but the object it points to has dynamic storage duration.
 
pointers confuse me every-time >.>
 
2:45 AM
0
Q: How to make CPU busy in 1 millisecond exactly?

AlbertI'd like to make a core of CPU keeping busy in 1 ms exactly. What is it doing is not important, for example, just do loop plus operation. In Windows, in C++. Give me related information for Linux is also great.

lolwut?
 
> Give me related information for Linux is also great.
This sentence irks me for some reason.
 
Because it's ill-formed?
 
There's that, yes.
But I think it's mostly because it starts with "give me".
 
3:02 AM
Is there a atoi() equivalent in c++ ?
 
stringstream and its variants.
 
Ah, yeah, that if you got a C++11 compiler.
 
Does "boner" have an alternative meaning I'm not aware of?
 
Erection
 
3:07 AM
I think he was aware of that.
Maybe she has a penis.
And she doesn't want people to notice.
 
I'm quite sure that's not what it means.
Oh, well, I'll google "boner"... :(
 
Yeah, some Googling is required.
 
Yeah, but it's dangerous.
Seems it's a blunder.
 
Oooh.
That would make sense.
I still like my she-male hypothesis better though.
 
so whats everyone up to this evening (or morning, or afternoon)? :)
 
reading superman comics and getting myself confused with c++ .... c++ is tough >.>
 
@R.MartinhoFernandes Did you just stumble on Superdickery.com?
@Failed_Noob Oooh yes.
 
@EtiennedeMartel Nah, I've seen that one before. I found this: mitchoconnell.blogspot.pt/2012/08/…
The Batman and Joker of the 40s seemed to have an unhealthy obsession with boners.
 
can you show me how to use streamstring to output a string silently and and then save the output in a integer variable ?
I wish this was correct char j = '45'; int i = (int)j;
 
3:30 AM
Of course it's not.
A char is just a number, after all. When you cast it to int, you just make that number fit in a larger space. But it's the same number.
And anyway, that: '45' is not correct C++.
 
Careful there. '45' is a multi-character literal.
@EtiennedeMartel It is, unfortunately.
 
Wut.
That is bound to blow up.
 
An obscure piece of insanity that has no purpose at all.
 
wait so ............ char j = '45'; is wrong ?
when am I suppose to use single qoute and double qoutes
 
> An ordinary character literal that contains more than one c-char is a multicharacter literal. A multicharacter literal has type int and implementation-defined value.
@EtiennedeMartel It's just crazy.
 
3:34 AM
Oh. Sounds like they just left a patch in the language.
 
@Failed_Noob Single quotes if it's a character, double quotes if it's a string.
 
So, one -> single quotes, more than one -> double quotes.
 
@EtiennedeMartel Yeah, there's no other mention anywhere except the index.
 
(More or less. See @R.MartinhoFernandes's answer for the proper version)
 
FailedNoob Nods his head :3
is "sstream" a standard library file ? because I am getting a error saying "unable to open sstream"
 
3:40 AM
#include <sstream>
 
<sstream>?
 
yeah that file
 
Unless you got a fucked up standard library, it is a file.
 
Yes, it's standard.
 
umm.. is there a online c++ IDE ?
 
thanks
 
np :D
 
hey is this the correct address ideone.com. Firefox warning popped up and says its untrusted connection
 
Don't use https.
 
okay ^^. I just clicked on the link and my webbrowser automatically added that https
 
3:47 AM
Certificates are quite expensive and people let them expire way too often.
 
yeah, I automatically wrote https://
 
#include <iostream>, not #include <iostream.h>
 
<iostream.h> doesn't exist anymore.
Sounds like you're using a very outdated compiler.
 
please no conio.h
 
3:50 AM
yes I am currently using borland
 
use gcc :D
oh, you are indeed using conio.h
there are lots of examples out there that just include conio.h for no reason
 
but getch() is defined in conio.h
 
std::getchar is in cstdio.h, and serves the same purpose
 
The reason your compiler can't find <sstream> is the same reason you're using <iostream.h>.
I think the old header was called <strstream.h> and the streams were strstream or something.
 
yeah, you should really update your compiler
 
3:53 AM
Definitely.
 
I have big doubt (I didn't ask this till now because this was a very big dumb question). what actually happens when you put :: (scope resolution operator)
 
you indicate in which scope you want what follows "::" to be looked up
 
That's just a separator for namespace names.
 
so when you type std::getchar() , it looks for the function in std ?
 
exactly
if you don't specify anything on the left of "::", then it looks it up in the global namespace
 
3:58 AM
a namespace is an alternative name for a function or variable ?
 
It's a space where names are put so they don't conflict with names from other sources.
foo::a and bar::a are different things, but they can have the same name because they're on different namespaces.
 
I understand ^^
 
> DF has been out for six years now. We now have proper bloody footprints to show for it, complete with direction, the kind of shoe if it was a shoe and not a foot, that kind of thing.
Oh my, I imagine how big the saves will be now.
 
could someone give me link for gcc windows version (64 bit if possible). I am unable to find a windos version :(
 
4:15 AM
These are maintained by one of the regulars here: sourceforge.net/projects/mingw-w64/files/…
You probably want the i686-w64-mingw32-gcc-4.7.1-release-win32_rubenvb.7z
 
Thank you
 
Or maybe i686-w64-mingw32-clang-3.1-release-win32_rubenvb.7z. Clang has much better error messages.
 
which one is better Cygwin or MinGW?
 
@Failed_Noob MinGW, IMO.
 
0
Q: returning address of local variable

JohnI'm trying to understand why I get this output for the below program [hello] [0xbfde68f4] [world] [0xbfde68f4] [world] [0xbfde68f4] The program is int main(void) { char **ptr1 = NULL; char **ptr2 = NULL; ptr1 = func1(); ptr2 = func2(); printf(" [%s] [%p]\n",*ptr1, (void*)...

close a dupe of the hotel room answer?
 
4:22 AM
I will try them both :3
 
@Mysticial Definitely.
So ugly.
The "I understand that it's not a good practice to return address of local variables but this is just an experiment." clearly shows they don't understand.
 
(void*)ptr1 is this equal to *ptr = &ptr1 ?
 
No.
It's pretty much the same as ptr1 there.
 
pointers confuse me from head to toe >.>
okay let me get this straight . pointer points to the value in the address space ? or it points to the address ?
 
@Failed_Noob Memory is a street. A pointer is a house number.
That house # may or may not be valid.
Going to a non-existing house is undefined behavior.
 
4:48 AM
The new name for Metro-style was going to be Douchebag-style but I had to step in and protect my trademark.
 
Is int main(void) incorrect ?
 
@Failed_Noob Yes. Though the void is optional.
 
if void is optional then the code is correct ?!!
 
Morning
 
This is definitely a dupe of something. But I don't what to search for.
0
Q: C++ pointer mechanism - error 2440

QuestI have an intf + class class IList { public: virtual IList** GetChildList()=0; virtual void SetChildList(IList**)=0; ~IList(); }; class CList:public IList { CList** m_lst; public: IList** GetChildList()=0; virtual void SetChildList(IList**); //... }; IList** CList::GetC...

 
4:58 AM
I find C and C# easy but when it comes to C++ . I can't understand a thing T_T.
 
@Mysticial I answered one of those a while ago.
 
Found it.
Also, ugh, double pointers.
 
June 29. How did I miss that?
With pretty pictures too.
 
It's not an exact dupe, though, but I think the answer covers it nicely.
I definitely don't want to answer that again.
 
5:04 AM
Oh... June 29. That was 2 days after the branch predictor question. I definitely had my auto-refresher off.
Otherwise, I usually see those questions.
 
Yeah... there wasn't much of a point to keeping the AF on when you're recapped that hard.
 
Some 60 rep user asking "plz help me" and plinking five users in the same message. I think I'll validate those flags.
 
He plinked a mod too... haha That's like bragging to the cops about how you cherry-bombed your neighbor's house.
12:22am Got a bus to catch at 4:30am. Should probably get some sleep. night
 
5:24 AM
Good night.
 
@Mysticial G'night.
 
5:38 AM
@R.MartinhoFernandes you really like to draw stuff, don't you?
I want to learn something new
What should it be?
 
6:06 AM
Baseball batting.
I want to get some experience with assembly. And maybe a little Haskell.
 
Meh, I know assembly enough to get by
And StandardML on the functional side...
Looking for something more practical
 
shell script is valuable: bash, awk, etc..
 
mawning
 
'night
 
@TonyTheLion:Thanks for your reply, I have absolutely no control over Construct Method. its An API of a platform. I have just made an application which passes the singleton reference so that i can handle call back anywhere in the application.what I wanted to know was can we perform const_cast on a static pointer? – yogesh singh 36 secs ago — yogesh singh 2 hours ago
what?
this guy posted that comment to all the answers
I'm not even sure what it means...
 
6:18 AM
I just realized that "callgrind" is named like that because it profiles "call" instructions.
 
oh well done :)
 
It does seem to be very high budget.
 
Extremely high
 
6:28 AM
It's the best 2011-2012 anime imo. (In my case, it having the soundtrack made by Yuki Kajiura probably has something to do with that.)
 
user1182183
6:39 AM
anyone believe I managed to run Visual Studio C++ 6 on Windows 7 64 bits without XP mode or any virtualization software? ; D
 
user1182183
0
Q: How Do I run Visual C++ 6 IDE on Windows Vista or higher?

Gam ErixVisual C++ 6 is crashing when opening a project or using the "open" file menu, how can I 'force' VC++6 to work under windows 7 without a Windows XP emulator / virtual machine / Windows XP Mode?

 
@GamErix VMWare? :)
 
user1182183
nop
 
user1182183
look at the question
 
user1182183
answer
 
user1182183
6:39 AM
i mean
 
I wouldn't want to go back to Visual C++ 6 though.
 
user1182183
yes but i think I did a good job answering my own question, it will hopefully help many people
 
Why not switch your browser to IE6 while you're at it :D
 
user1182183
well I don't need IE6, but VC6 isn eeded for some projects : D
 
using Git, what's the difference between add Index and Commit?
 
user1182183
6:43 AM
i'm going to play around a bit more maybe I
 
user1182183
will be able to fix the open file menu crash
 
user1182183
support.microsoft.com/kb/231655 should do the job, but I don't think that aplies to W7
 
user1182183
As for "Add Ins" I'm curious where to get such an add-in which the KB article says we could use.
 
hi, can someone tell me what is the need of the two-phase name lookup. why dividing the name lookup into dependent and non-dependent lookup, if we can do only one after instantiation. thanks in advance.
anyone ?
 
lol , well it's too late here , so I just want to know the answer in a brief and tomorrow I will ask there for a long conversation. so if you can help that would be great.
 
user1182183
why not ask now and check out the answers tomorrow? :P
 
user1182183
I always do that if I go to sleep
 
@GamErix: because sometimes people ask for more details. so I want to be on time if my question wasn't clear enough.
 
Consider the overloads to support 3 arguments. With 5 possible argument types you need 5^3 = 125 overloads, plus the 25 overloads for two arguments, the 5 overloads for 1 argument and the single no argument version; in general, for n arguments that's (5^(n+1)-1)/4 overloads. That's a bit too much for my taste. — Cheers and hth. - Alf 3 mins ago
 
user1182183
7:11 AM
ye that's a bit true
 
^ Causal math dropping. :-)
 
user1182183
xd
 
user1182183
good that we have solutions to this
 
user1182183
at least in other languages if not C
 
7:29 AM
good morning all
 
good morning
 
@RadekSlupik !_! you change your avatar too often... if I wasn't so lazy, I would make an extension to set it a poop
 
@Cheersandhth.-Alf then how did you type that ¬_¬
 
@thecoshman okay.
 
7:33 AM
Anyone already took this test? :P : iqtest.dk/main.swf
 
Xeo
@Mr.Anubis heh, I did for fun
 
@Xeo curious to know what was your score?
 
Xeo
118, but I did guess at 3-4 questions
 
@Xeo jeez!! I got 112 , another friend of mine got 124 0o though
 
Xeo
It's not like those test mean much
Especially one that encourages "random guessing if you don't know the answer"
 
7:39 AM
@Xeo the friend who got 124 made me feel like I'm some stupid :D
 

« first day (663 days earlier)      last day (4291 days later) »