« first day (114 days earlier)      last day (4836 days later) » 
00:00 - 22:0022:00 - 00:00

12:52 AM
ugh
irritated bowel = unfun
 
tmi
 
lol
 
milk might help
 
already drank some
but then, I guess I didn't expect the nurse's advice to instantly cure me
well gonna try and hit the sack again
if I don't succeed in getting to sleep, I will come back and inform you about it loudly
 
1:19 AM
alright
this is me informing you that my attempts to sleep made me much worse
 
2:01 AM
`#pragma once` or include guards or both?
`#pragma once` has the following advantages:
+ no need to invent include guard names
+ less chance of naming conflict or forgetting to update include guard name
+ more clear and concise code
+ can work better with certain tools, like class view in Visual Studio
and some disadvantages
- is just a de facto standard, not officially standardized even in c++0x
- may not work correctly with e.g. symlinks to same file
still, isn't it time we stopped inventing silly include guard symbols and switched over to #pragma once?
is there any commonly used compiler that doesn't support #pragma once?
 
@AlfPSteinbach: I use symlinks for all kinds of various project management (usually through directories rather than individual files), so #pragma once doesn't work for me
you should not be updating include guard names, and three lines of boilerplate is hardly significantly more than one (at least in C++), so that reduces the advantages
similarly, inventing the names isn't hard; I've fallen in love with this program
if certain tools work better with #pragma once, then there's really nothing you can do about that except use what they need, but you can add it without removing include guards
but those tools aren't recent compilers, which is the one tool every c++ programmer uses :)
 
sbi
2:38 AM
@DeadMG This is me informing you that you aren't alone in that. It's 3:40am here, and I'm as awake as if it was 10am after a good night's sleep. The problem, though, is that I won't feel like this at all come 10am.
 
2:40am here
but I can sleep in all I like tomorrow
 
Man I love templates. I can't believe it took me this long to think of this. Time for some refactoring.
 
2:53 AM
@PigBen: be careful that your replacement action leaves that position so that your conditional is false
 
 
2 hours later…
5:06 AM
0
A: Setting up a FAQ for the C++ tag

user153047To add my opinion to the discussion: Let me start by saying that I and many others appreciate both the knowledge and clarity of many of the C++ experts here at SO, and I believe that they should in fact be rewarded for that time and effort. However, I believe this idea of having a C++ SO FAQ unf...

 
 
1 hour later…
6:07 AM
7
A: convert uint64 to uint32

Jeremy FriesnerNo. You can't fit two gallons of water into a one-gallon container, and you can't fit 64 bits of data into a 32-bit value.

0
A: Cannot convert (*)[] to **

Larry GritzThe problem is that a double** is a pointer to a pointer. Your 'f' function wants to be passed the address of a pointer to a double. If you call f(var), well, where exactly do you think that pointer is? It doesn't exist. This will work: double *tmp = (double *) var; f (&tmp); Also, it ...

 
 
1 hour later…
7:23 AM
What kind of numpty uses symlinks to the same file?
i mean. one of the big unanswered questions is, what exactly the best practice is, wrt laying out large projects.
everyone i talk to seems to have a different opinion.
made especially difficult by the fact that different compilers seems to have completely divergent search path logic.
when resolving #includes.
 
@ChrisBecke I use symlinks, and, as I said, it's almost always to directories rather than files
but the effect is the same: the same file can be accessible through different paths
 
symlinks are fun. but how do you mix symlinks and some kind of scm
thats going to throw it through a loop
 
hg versions symlinks
git does too, I believe
 
on *nix only?
 
I don't know how they behave on windows, if that's what you're asking
but now that windows has real symlinks, I imagine it's the same
 
7:28 AM
I use svn:externals with SVN. But those dont resolve down to symlinks. SVN actually checks out the files to multiple places.
 
using svn is so 2010
 
but, I do make sure that the files are mapped to a single place wrt each particular project.
so there is never an ambiguity as to which path might be used to reach a particular file.
It does fuck me off just a little bit that all the dev environemts ive used
make it so damn hard to... cleanly create a muitople module project
and reach the appropriate header files
without resorting to either
#include "../../../someothermodule/someheader.h"
or symlinks
 
that's because you're using restrictive tools that force you into their way of thinking
 
or some such.
 
instead of just a traditional unix shell and ubiquitous tools
 
7:32 AM
the "best" plan ive come up with is declaring that $(ProjectRoot) is added to the default include search path for all "Projects".
assuming that the source for each target is located in a sub folder off of that, then any module can reach any other module by going
 
managing include paths is one way I use symlinks, btw
 
#include "someothermodule/someothermodulespublicheader.h"
 
it solves the problem you're describing
 
well, yes, but it makes it slightly harder to manage, as now there are a whole lot of implicit links that are not immediately visible
using symlinks
violates the least surprirse principal
 
what implicit links?
 
7:35 AM
the fact that two directories map to the same location
is not immediately visible
 
sure it is, ls can be set to show symlinks differently
 
XCode has a rather "nice" - but hugely dangerous feature.
 
but the whole point of symlinks is that I can give things new names (so that two names map to the same location)
 
any header file that is listed as part of the project, will satisfy a #include request that otherwise would not find the file via any other means
 
ick
 
7:37 AM
which does make things dangerous if you have multiple files with the same name
 
I'm still set in makefiles right now, because they work but more because existing things use them, but redo looks interesting
I've always disliked IDE "project management"
 
thats a hardcore approach ive never managed to get into.
allthough, a visual make file editor might go a long way to bridging the gap
 
anyone here using AirplaySDK?
 
@ChrisBecke if you mean make, most makefiles are a steaming pile of shit (which shouldn't be surprising, since most of anything is crud)
 
nonetheless, the IDE's and other make tools, all invoke the same compilers at the end of the day. and the compilers rules are the ones we need to play by
so the problems are ultimately the same, no matter if we use an ide or not
 
7:42 AM
dependency management and configuration management are not even close to the problems a compiler solves
 
by "makefiles" I mean, some kind of file that lists the sources needed to build a project, and a tool that can compute a dependency tree from that and ensure that the files are built in the right order.
 
@ChrisBecke: try something: decompose what it actually means to be an Integrated Development Environment. "Development" is the most important word, but everything programmers do is development of some kind, and it's just indicating an IDE for programmers (as opposed to real estate development :P). "Environment" is meaningless, since it just says we are collecting various things together.
"Integrated" is the useful word. how do you integrate different tools under one roof? you make assumptions about how they should be used. sometimes this works great (such as VC's debugger), but whenever you try to color outside those lines drawn for you, it will become very, very painful
 
I use an IDE because they satisfy a least effort principal. On windows with VS, or Mac with XCode, I can create a project with multiple targets (exe's / dlls / libs / dylibs / whatever) that all depend on each other
in something like 5 minutes
the only problem is, the lack of a built in mechanisim to get the #include paths sorted out.
which, applies to your environment just as much.
so, its not hard to color inside the lines.
for the most part
 
copy -R template/some-name new-project; cd new-project; hg init; hg commit --addremove -m "Initial commit" # less than 5 minutes
 
and why exactly would I want a directory structure even MORE convoluted than whats possible in the IDEs?
 
7:51 AM
that's not more convoluted, it's simply picking a template exactly like IDEs do for you
I'm not saying it's hard to stay within the lines most of the time, but projects find a way to want to go outside, even if just a little bit, from time to time
I've used IDEs in the past, I'll continue in the future, but I won't again endure the pain of forcing them to work other than as they were designed
 
well, yes. by the same token I feel tempted to use "goto" every now and then
 
I use goto every now and then
 
but, doing what you can, within the limits set by the IDE's seems like a good plan.
 
perhaps once or twice a year
 
as teh resulting source layout can be quite simple.
but again. I think we are distracted here.
 
7:54 AM
I don't see why it must be complex without an ide :)
 
the core issue is, regardless of tools used to browse/build it. What IS actually a good way to structure a large project.
with multiple targets
 
as a collection of smaller projects
keep going down until you get a manageable size
 
Microsoft has made sure that CLI languages win here. As reflection means that the binary produced by another project is sufficient to satisfy the requirements to link it to a consuming project.
 
that's nothing new
unless you've been stuck with only C and C++ – the TU model is 40 years old and horribly broken today
 
TU?
 
7:58 AM
translation unit
 
oh, translation unit?
I don't think its horribly broken.
 
do you remember how headers were originally supposed to work, before include guards?
 
well, there were not meant to be any definitions in them. just declarations.
again. it was that ass stroustrup
 
no, it wasn't stroustrup
 
whome everyone seems to revere overly much
 
8:01 AM
and you forget about type definitions
struct Definition {}; struct Declaration;
 
typedef ?
but those were typically individually wrapped.
 
typedefs are just declarations (but all definitions are declarations too); that's probably a red herring for someone not familiar with the standardese terminology
individually wrapped in what?
 
#ifndef STRUCT_DEFINED
struct Blah {
};
#define STRUCT_DEFINED
#else
extern struct Blah;
#endif
 
"extern struct" was not legal, iirc, and you don't need to declare something already defined in the first place
but I'm talking about before macros were used as guards
 
I dont really know how headers were "meant" to work. Except as a brutally simply way to link a lot of files together to form a single translation unit that would be compiled.
 
8:05 AM
you were supposed to manage the dependencies and ordering yourself, in every implementation file (what we'd name *.c or *.cpp today)
so yes, it was brutal
but it required minimal work on the preprocessor's part to join them together to feed to the compiler (which was a separate program)
and CPU cycles were more valuable in the 60s than today
you can see vestiges of this even in the C standard: headers are required to define/declare only the names they are said to define/declare and no more
and the reason that's been kept is user programs got in the habit of using names from the stdlib and other headers when they didn't have a conflict because they didn't use those other headers
the next time you see some big debate about include guards vs pragma once, or people munging about having to carry headers plus object files (which is the particular piece of brokenness you noted and then discounted), remember that we've expanded and repurposed this system many times over
 
all good systems, in my book, have that attributes
that they can be easilly extended to support new paradigms
which is why I find the #include system nominally quite elegant
 
"easily" only as long as you keep finding acceptable sacrifices
 
and the sacrifices are?
 
c++ compile times are no longer acceptable for many people; even you consider reducing them (through reflection) to be a big win for CLI languages, for example
 
c++ compile times are related to the number of headers that are included?
 
8:13 AM
no, related to the TU model that requires re-compiling (re-instantiating) the same templates over and over again
think of all the logic we're booking in templates; e.g. parser libraries written entirely in expression templates
then re-evaluate all that logic once per TU
the same thing applies to things like inline functions, etc.: ideally the compiler would process them once and store an intermediate form
but it's much, much worse with templates
 
templates, granted, are an abomination.
 
no, they're awesome
 
but fitting them into the TU model does require sacrifice
 
No. theyre what we live with because thats what we have
alternatives might have changed c++ more.
 
8:17 AM
okay, I'll half-agree with you: I'd much rather have compile-time logic that flowed with the rest of the language, but I still want that compile-time logic in the language itself
 
ill agree 100% with you there,
 
@ChrisBecke don't forget that the committee sacrificed many possible alternatives at the shrine of C compatibility
which, people say, had that been abandoned, C++ would've never gotten off its feet
 
which. with the full admission that this is colored with the rose tinted glasses of hindsight. could be viewed as a mistake
 
I don't know about that, but I do see plenty of languages that weren't C compatible and fell by the wayside
 
and strangly, objective-C never really took off.
 
8:20 AM
true
 
but. whats the point of building c++, on top of C, so that it could be (potentially) used as a systems programming language, and then introducing -AND MANDATING- features that rendered it unsuitable for that task?
it was bait-and-switch
 
I've never been able to put my finger on why I'm skeptical of the "C compatibility was a hard requirement" argument
 
I don't think it was
I mean...
It was sufficient that (a) it looked a lot like C in several respects
and C and cpp files could be used together in a single project.
as it is, cpp can't compile c code anyhow
 
#a also fits with one reason java and c# got popular
 
whereas objective c can. and its c++ that won. despite violating the "hard requirement" of c compatability
 
8:23 AM
@ChrisBecke my impression is the c++ committee hoped/wished the c committee would work with them on that more, and the c committee more or less said screw off
C++ was actually much more compatible with C in the early 90s, when it grew most in popularity
 
i refer again to the bait-and-switch logic of the c++ committee
 
mostly because vendors maintained their own stuff, and made sure it worked together
 
yes. when operator new still mostly returned null in popular flavors of c++
(on failure)
 
and that was also before templates, when c++ looked much more like C-with-classes
 
oh, and the big "fuck you" to C's handling of void*
 
8:25 AM
in that context, C compatibility is much more important than today
that's why I can't discount the hard-requirement-argument entirely
 
the "hard requirement" didn't mean that "class" had to be an alias for "struct".
 
I don't think it was, at first, but I've either forgotten or never knew
 
So the misdesign of class, and the nw and delete operators was all the c+ comittees fault
 
(I always use 'struct' to define classes, fwiw)
 
I don't understand why the common pattern is:
Class Bob {
public:
protected:
private:
};
 
8:28 AM
I think the synonymity came about when realizing you could generalize things like value-initialization and give every type a default ctor
 
When the whole point of class was to introduce a default scope of private:
 
you know the pain of hard tabs in makefiles, right?
 
so, a rational approach would have been to go :
class Bob {
protected:
public:
};
not at all. im an ide man remember :P
 
that came about because the author discovered a nifty trick with the lexer he was using at the time, then he couldn't change it several weeks later once he had two dozen people using it
this was in the late 60s or so
hundreds of thousands of people have lived with the pain of that since
millions? I suppose there have been enough millions of programmers for a million of them to have experienced that pain
@ChrisBecke that's one of the reasons I always define classes with 'struct': it feels more natural to put (most of) the public interface up front, most of the time, and I can do that with one less line of code
bases being public much more often than non-public is another reason
 
exactly
now, if "class" had been a substantially different beast
still based on a C struct, so that early c++ compilers could have been simple pre-compilers
 
8:34 AM
I don't know how similar Cfront 1.0 was to what you're imagining
 
it might have been worthwhile adding a new keyword
 
"a" new keyword? public, protected, and private aren't enough for classes? :)
mutable, too
though that came much later, iirc
 
'class' got added to the global scope of reserved words
allthough, public private and protected are too
 
@ChrisBecke: incidentally, before I go afk, have you played with constexpr in 0x? some compile-time stuff is much easier, but it's essentially designed for another purpose
 
sadly I have not had much chance to look at 0x yet.
my windows work is still on msvc 2008
and XCode on mac is still on gcc 4.2 or something
 
8:40 AM
see, if you weren't tied to an IDE you could grab the latest gcc or clang and play with it :)
 
lol. point!
 
0
Q: errors compiling project with boost asio

TonyI have created a separate project to connect my server component to clients using TCP/IP with boost::asio. I first created and tested this project separately first and tested these classes, everything worked fine. Adding this to my server component it now no longer compiles and I get following ...

any suggestions anyone?
 
use openssl?
 
8:55 AM
why would I want to use openssl? I don't need ssl
 
@Tony I suspect include paths or a rogue macro
 
@FredNurk would posting any code help determine possible problem?
my own code does not contain any macros
so then it would have to be in boost code.... i guess that's unlikely
 
9:11 AM
I'm unfamiliar with boost.asio and more so using it on windows, so not sure how much help I'd be, but it might help, or could really help someone else. can you reduce the test case to a pastable size?
 
@FredNurk not sure, thing is when it was small it was working, now it's big and it stopped working
 
9:35 AM
@Tony: ArunMu's latest comment is relevant, did you define _WIN32_WINNT and to what value?
(VC may have included a default definition when creating your project)
 
VC 2010 creates a file called dependencies.h iirc, thats included from StdAfx.h, when a new project is created using the wizard. That contains default definitions for most of the windows sdk version macros
 
@FredNurk I included it in my main project stdafx.h as follows:
#define _WIN32_WINNT 0x0501 and it seems to have resolved the issue
 
@Tony I prefer such configuration macros on the command line, but how to do it should be a project convention
 
9:55 AM
if there was any chance that it would be a sane option to build the project with a different value for that macro, maybe
@Tony I find that, starting using a ssl library, in clear text mode, is the better option. you ALWAYS want ssl later on. if only to ensure your product can comminucate through asshat configured firewalls that do deep packet inspection and try to block/route based on that
ssl should be the default for any internet comms nowadays. sad but true.
 
@ChrisBecke the product this component communicates with does not support SSL (unfortunately) so I do not think in the near future it will be implemented
 
@ChrisBecke not for ease of changing, but because it's easier to keep CPPFLAGS in sync
 
10:16 AM
@Tony make sure to post an answer :)
 
@FredNurk I will :)
 
 
1 hour later…
11:25 AM
anyone here have any experience setting up the android ndk on ubuntu, macos or windows?
clearly i'd like to stick to c++ for my android app dev
 
 
2 hours later…
sbi
12:59 PM
One of these dupes should probably be made an FAQ: stackoverflow.com/questions/4919322/…
Anyone out there having the time/energy to look at this and do it?
 
1:21 PM
I think dependent names are already in the C++ FAQ.
Oh, it's not about depdendent names.
Anyway, I think also that is in the C++ FAQ.
 
1:37 PM
@AlfPSteinbach is it not about dependent names? I think it is, the name is not dependent and as such it has to be verified during the first pass (prior to type substitution), and that fails
 
1:59 PM
@DavidRodríguezdribeas let's say the name was dependent (on a template parameter). would that help?
@DavidRodríguezdribeas Oh, there's a D1 class in between. Didn't see that.
 
2:16 PM
how is winapi not a synonym for windows?
 
@ChrisBecke what's original context of that question?
 
 
1 hour later…
3:32 PM
in the context of the winapi and windows tags
where, almost every low usage tag that implies some kind of windows dev
win32, win32api, etc, all are synonyms for winapi
but winapi is not a synonym for windows
despite both of them even having the same tag descriptive text
 
@ChrisBecke Uhm... I won't go into the discussion, but I think there are some differences. If someone is having problems configuring a timer to say, 10us through the use of some library as ACE, then the issue might be related to windows (the granularity of the OS timer is not good enough) but it will not be related to the API itself --in fact the user does not even know what API is in use
I can imagine people using a portable library, checking the behavior and tagging questions about differences with [windows], even if they are not directly using the windows API (and thus will not mark as [winapi] [win32]...)
 
if you look really hard you could invent some distinctions
but theyre almost impossible to enforce.
theres no way thats not hugely convoluted of explaining to people why their post is tagged incorrectly, or even to guide people to re-tag posts reactively
so its a pretty useless distinction in practice
 
It is not that hard... if it is related to using the windows api, then tag as [winapi] if you are not working with the api, then don't tag [winapi] and tag [windows] if you think the issue is related to the OS
but then again, I do not code in windows, so I would not know :P
 
sbi
4:01 PM
@AlfPSteinbach Well, @GMan didn't find it, but I dug and found stackoverflow.com/questions/1239908, which seems to fit the bill. Anything I missed? If not, I'll put that on top of the dupes list.
 
I am quite busy, that is why I did not dig into it, but I seem to remember one of the c++-faq containing an answer by @litb that (AFAIK) tackled this issue
 
sbi
@DavidRodríguezdribeas If so, it's not an FAQ. I would, however, be fine to put it in there and remove the other one. Meanwhile I'll put the current FAQ on top of the dupes listed in that question. Feel free to change that should you decide to make the other question an FAQ.
I just see that we have to almost identical FAQs regarding initialization lists: stackoverflow.com/questions/1711990 and stackoverflow.com/questions/210616. Mea culpa. Which one do you think is better? Or should we merge them? If so, which one is to be merged into the other one? Any other ideas?
Also, for those who missed it, there's been a belated entry to the discussion regarding the FAQ on meta:
11 hours ago, by Feeds
0
A: Setting up a FAQ for the C++ tag

user153047To add my opinion to the discussion: Let me start by saying that I and many others appreciate both the knowledge and clarity of many of the C++ experts here at SO, and I believe that they should in fact be rewarded for that time and effort. However, I believe this idea of having a C++ SO FAQ unf...

 
4:52 PM
@sbi I just had a couple of minutes between builds and I looked it up. It was related to dependent name lookup, but centered on where 'typename' and 'template' are required, so unrelated to the question at hand
 
sbi
@DavidRodríguezdribeas Ah, that one is in the FAQ list, I think. At least I had seen one earlier with a long answer from @Johannes.
 
5:05 PM
evening
 
5:28 PM
folks
how does "@name" work in the chat?
can i just say "@dude" and then all users called "dude" will be hilighted and notified?
or will it only work for users that are owners or were active in the last N days or something?
 
@JohannesSchaublitb Try it on someone who's not here now(but does come here often), like @FredOverflow
 
now you already tried for me :)
lulz
 
Talk shit about him, and see if he responds to you later.
 
someone else's turn to get their account blocked :P
 
5:47 PM
@JohannesSchaublitb My assumption is that it is handled by the javascript side of it. That is, if the user logs in and the @user is present in the list of messages that the screen brings up, then it will notify him. But that is just a hunch, I don't even consider trying to read the JS :P
 
@PigBen Hmm. I wonder if I get notified about messages to myself.
Nope
 
@PigBen What's up?
 
@FredOverflow We were trying to find out how the notification system works. So I used your name because you weren't here, but I knew you'd show up eventually. Apparently you got it.
 
0
A: C++ - What does this double pointer/array structure really mean? I have trouble picturing it.

jason bournein c++ array are pointers , that is the memory address of first element of array is the name of array , so now what you have is array of pointers , hence **

Another misconception about arrays and pointers :(
 
6:03 PM
I just read the newspapers. They say Italian PM Berlusconi is taking all kinds of actions to prepare for the release of photos showing him naked at one of his parties. But they don't show the pictures! So,
now if that's not off-topic i don't know what is
 
6:17 PM
finalAmount = initialAmount*(interestRate% + 1)^nYears;
 
sbi
@JohannesSchaublitb It works just the way you saw it: I dropped your name and you were notified. :)
@AlfPSteinbach Woah! And you took offense on a dead kitten?!
@PigBen I suspect you do. (You get a beep and the small (1) overlay, after all.) However, in general you only get notified if you aren't currently in the chat anyway. I suppose it's hard to post a chat message while you're not in the chat, though, so you aren't able to prove me wrong. :)
 
@sbi You posted a strangled cat photo. I post photo of Berlusconi with vital parts censored. But I admit, would not like him nude beside me on subway.
Hm, our own PM Jens Stoltenberg used to pose for photos when he was chair of the "men's role" committee, but instead, an artistic rendering of nude Barack Obama & wife Michelle, posing with a Unicorn (this just to balance thing, not just offend Italy):
 
@sbi I meant the notification in SO(the number highlighted in red). But I just realized I don't get that either, even when you posted that message to me. But you gave me another idea. @PigBen
Damn, not fast enough.
 
6:37 PM
In passing, if anyone's interested in all these nude PM's and history of that, it all started with Norwegian prime minister Per Borten, in 1969, conducting an interview in only his underpants. Of course it was hot. They took photos.
Says Wikipedia, <<only days before Queen Elizabeth II was invited to the same farm on a state visit to Norway. The picture of Borten in his underwear went around the world, and the British newspaper Daily Mirror printed the picture over two pages with the headline: "Now the Norwegian Prime Minister is ready to receive the Queen.">>
 
sbi
@AlfPSteinbach I take a dead kitten over a naked Berlusconi (cen) any sored or notday. :)
@PigBen That I meant, too.
Meh. FF is using >1GB of RAM again, freezing every 20secs for 5 secs. I think need to restart that darned thing.
 
-2
Q: Introducing donations to authors

jweyrichFirstly, I can't tell exactly how much I learn(ed) from SO, but it has been quite significant. I also love to help, and I don't do it for money or any other form of retribution - it's purely altruistic. I sincerely hope my answers are of help to other people. After saying that, I feel more comfo...

 
6:53 PM
@sbi it's because they decided to "fix" the mem problems in 3.0 (i think it was) by adding garbage collector
 
sbi
@AlfPSteinbach Maybe. Or it's one of those >25 AddOns I have installed. Or maybe it's the fact that I have about a hundred tabs open in five browser windows all the time. Or... Really, I'm almost tempted to check out Chrome, even though I know using google leads to the dark side. (Not the dark site, mind you. That's here, though).
 
7:31 PM
(chrome or opera) > ff
 
7:49 PM
yellow.. I am doing something stupid in my software and a lot of time is consumed somewhere. Is there any free profiling tool for x86 windows that will help me figure out (with ease) where all the time is going?
 
@72con The Windows SDK (Vista or newer) comes with Xperf.
 
I'm on Windows 7 so that should be kool. Thanks..
 
8:46 PM
@sbi oh, I don't know why I mentioned your alias on that comment. I probably misread a comment or mixed it in my head.
 
sbi
@jweyrich ???
 
@sbi on Meta. Nevermind.
 
sbi
@jweyrich Ah. Sorry for being so dense.
 
@sbi: I forgive you. Maybe.
 
9:02 PM
the only answer out of 4 that bothered to read the question...
0
A: What is forward declaration in c++?

JohnA fowrard declaration declares the identifier (puts it in a namespace) before the actual definition. You need forward declaration of structs if you need to use a pointer to the struct before the struct is defined. In the context of the answer you linked, if you have typedef struct {...} Foo;, ...

 
I disagree
he only has two sentences with a question mark, the title and in the question body, and they both ask the same thing: "What is forward declaration?"
I don't see how the question is anything except that
 
@sbi no worries.
Is int x = 0; x = (2, ++x); UB? I read §5.18, but I'm not sure about the assignment because x is changed on left-side of the expression too.
 
i love C++
 
yes, it's UB
you modified x in x++, then you modified it again by assigning to it.
 
sbi
9:20 PM
@DeadMG What for? (Sorry for being so dense.)
 
@sbi: You apologized to jweyrich for being dense
and I decided that I may or may not accept your apology
 
@DeadMG why would you ever focus on question marks? typographical nuances don't make a question
 
@FredN: When you ask a question, it has a question mark at the end of the sentence.
there is absolutely no indication in any of the question's text that he's asking any question except the one a dozen people answered
 
@DeadMG read the accepted answer on the linked post, which states you can't declare an anonymous struct, to understand the context
 
I did read it
still don't see how it makes those other answers wrong
 
9:23 PM
it's, like, the complete opposite of "absolutely none"
 
sbi
@DeadMG And I decided to make fun of that message of yours. Unfortunately, it backfired.
 
did I say they were wrong? they aren't responding to the context of the question, but not wrong
 
sbi
@FredNurk I'm with @Dead on this. See my comment re yours to the question.
 
I could say 2 + 2 = 4 without being wrong
 
@sbi: That kind of thing works- but only when the chat takes place in real time
but in this chat, people back refer to messages left hours and hours ago and rarely actually keep up with a chat
 
sbi
9:25 PM
@DeadMG Your message (which this one refers to) seems to refer to my message to @FredN, making this completely confusing. But that might just be me, being too dense.
 
har har
 
sbi
@DeadMG That sentence actually makes to contradictory statements.
0
A: What is forward declaration in c++?

sbiTTBOMK, in C++ the term "forward declaration" is a misnomer. It's simply a declaration under a fancy name.

 
9:39 PM
@sbi: I used to dislike "forward declaration" too
I've come to accept it as "declaration which isn't a definition" in order to effectively communicate
 
@sbi TTBOMK??? How many words can you cram in an abbreviation? (BTW, while To The Best Of My Knowledge that abbreviation is known, it might help others if it was fully spelled out)
 
I had to google it
 
sbi
@DavidRodríguezdribeas Oh. I guess I have been on Usenet for too long. Sorry.
 
@FredNurk me too.
 
sbi
9:51 PM
So what about all the others I regularly use, like OTOH, AFAIK, IIRC? Are they just as undecipherable to the "common reader"?
I just noticed that I was writing IMO. How about that?
 
@sbi I guess these are more widely used. BTW, FWIW, FYI also.
 
otoh and afaik are much more common out of those 3+TTBOMK; I use all three of those often, but iirc gets misunderstood more than the others
otgh is fun too :)
 
So you declare variable.
int i;
a forward declaration doesn't create an instance.
 
I believe those to be more common, kind of like ASAP...at least AFAIK, then again, I am not the best to judge, as I do understand most of them, but TTBOMK is quite unusual.
 
I think I use IMNSHO more than IMHO or IMO
 
9:56 PM
Biggotry
 
sbi
@Xaade That declaration is also a definition. It does create an instance.
@FredNurk ???
 
PEBKAC.
 
@FredNurk In my not so humble opinion
 
sbi
@Xaade A "forward declaration" is just a fancy term for a class declaration (that's not also a class definition).
 
The Gripping Hand is a 1993 novel by Larry Niven and Jerry Pournelle. It is a sequel to their landmark 1974 work The Mote in God's Eye. The Gripping Hand is, chronologically, the last novel of the CoDominium Series. In the United Kingdom, The Gripping Hand was released as The Moat Around Murcheson's Eye. The Gripping Hand revolves primarily around two minor characters of the first book, Captain Sir Kevin Renner (ISN, Reserve) and His Excellency Horace Bury, Imperial Trader Magnate. It also resolves many of the conflicts and tension remaining from the preceding novel, but much of the p...
 
9:58 PM
@sbi This is why I like C#.
 
@FredNurk That is like digging into IMHYCO (In My Humble Yet Correct Opinion)... :P
 
@sbi Too much wasted time trying to make the language work, rather than actually architecture a design.
 
00:00 - 22:0022:00 - 00:00

« first day (114 days earlier)      last day (4836 days later) »