« first day (22 days earlier)      last day (4916 days later) » 

12:49 AM
Harry Potter and the Nondeduced Context
Indiana Jones and the Ambiguous Overload
Debbie Does Dynamic Dispatch
Bjarne Stroustup and the Sundance Kid
It's a Wonderful Template
Citizen Koenig
One Flew Over the Lambda Expression
Dr. RAII or: How I Learned to Stop Worrying and Love the Destructor
2
A Function Pointer Named Desire
The Silence of the Lambdas
3
 
lol that's a good one.
 
 
1 hour later…
2:05 AM
Where can I get 64-bit C/C++ compiler for windows
 
@Akhil Visual Studio Express is the free version of Visual Studio; you can get Visual C++, including its compiler.
(That's not the only one, but it's probably the easiest to get started with on the Windows platform.)
 
Cant I just get the compiler binaries?
 
You don't have to use the Visual Studio IDE if you don't want to. If you really just want the compilers, they are distributed as part of the Windows SDK as well.
 
 
2 hours later…
4:29 AM
hi guys, an error this time: " [Linker error] undefined reference to `void File::viewUserDetails<Doctor, Doctor>(std::vector<Doctor, std::allocator<Doctor> >&, Doctor&, char*)' "
this viewUserDetails is a function template
 
4:48 AM
any idea?
 
Is the function template defined in the header or just declared in the header?
 
declared and defined in the header
 
 
1 hour later…
6:06 AM
can we use pointers inside fstream's read()?
i mean can we load data into a pointer object?
sizeof(*ptr) returns 4 bytes for typical pointers or the total bytes of attributes inside the object?
Q #2: can we use reinterpret_cast to downcast a Base object to derived object and access functions of the derived class?
 
 
4 hours later…
sbi
10:07 AM
@Sara That means the compiler finds the declaration of a function template (member of class or namespace File) template< typename Doctor> void File::viewUserDetails<Doctor, Doctor>(std::vector<Doctor>&, Doctor&, char*), but the linker cannot find the definition.
@Sara You cannot read much useful stuff into a pointer. Usually your read into an allocated piece of storage that the pointer refers to.
@Sara No, you mustn't do that. When you think you need any cast, be suspicious. When you need reinterpret_cast, assume you'#re wrong.
To cast from Base* to Derived*, Base& to Derived&, use dynamic_cast. If you know what you do, use static_cast.
@Sara It seems you are badly in need of a basic C++ introductory text. See this question and make your pick.
 
@Sara: re reading pointer values from stream: technically you can, but generally those pointer values refer to memory locations in some earlier process that doesn't exist anymore. General problem is called serialization. Doing serialization by hand is a good way to learn about it, but then use Someone Else's framework, like the Boost library's serialization support. Cheers,
 
 
1 hour later…
11:24 AM
I've just asked a question.
0
Q: Improving The Transparency of Complex Systems

CiscoIPPhoneI maintain some software that takes a lot of input, does a lot of transformations on this input and produces output. The system works as it should. However a frequent problem is that people don't understand why it produces a certain output given their input because of the complexity of the syste...

 
 
1 hour later…
12:26 PM
I deleted the question, I may try to ask again with a more specific question later.
 
anyone know what the advantages are of little-endian over big-endian or does it not have 'advantages' per se?
 
@Tony: little-endian has no special cases and is just more elegant. but it makes for funny displays of memory contents in debuggers. reason is that we inherited our number notation from the arabs, who write from right to left...
 
i see, interesting
is the base address for a program's stack the same for every program, or how does that work?
 
@Depends on the OS and the program. Niels Borh (Danish physicist) had this to say about the question "How many tails has a dog?": - It depends on the dog.
Hm, I don't see any edit choice here. Should be @Tony, and should be "Bohr".
 
12:42 PM
@AlfPSteinbach arrow up key lets you edit last msg
for at least 2 mins I think
 
Oh, thanks!
 
do you know how it works either in Linux or windows?
 
@Tony: generally, on most OSes, stack expands downward, so is placed somewhere top of address range. U can check it simply outputting address of a local variable in main. I think with a default 33-bit Windows installation that will get you an address up towards 2G (Windows uses upper 2G for itself, by default). But, just check it. :-)
 
thx man
 
I saw in interesting bug recently posted on a forum
in one of their classes they allocated a huge array on the stack
 
12:48 PM
@Tony: with g++ I got 0x22ff4f, and that's not very high. So, reality intrudes! :-)
 
hehe
 
They created an instance of their object in WndMain, but because the object was too large (0.5MB) WndMain wasn't even being entered, not even the first line of the function was being hit
 
thats crazy
 
sbi
1:06 PM
@AlfPSteinbach I think a 33bit Windows installation would be far from being anything "default". :)
 
haha typical windows or what?
 
1:56 PM
I am starting to get annoyed by the phrase C/C++, more specifically, the way people use it like its referring to one language.
 
2:09 PM
would you feel better if someone actually said "C or C++"?
 
Well it would be better if they said one or the other, since they are different
 
when I ask for help I say "solutions in C# or VB.NET"
for the .NET framework
I know C and C++ are not the same, but C++ allows for backwards compatibility
I think there is enough similarity that the OP is trying to invite as many answers as possible
back to my original point: I do not just just ask for C# help when it involves a general .NET question
It seems really pedantic when people comment an a OPs question stating a known fact "C/C++ is not a language"
 
They have a point. C++ isn't a strict superset. What will the OP do when he receives an answer he can't use?
I understand your point too though.
 
I assume the OP knows C and C++ when he asks for help by stating "C/C++"
It would be ridiculous if asked for help with the .NET BinaryFormatter Class and said I need a "J#/JScript/VB.NET/C#/C++CLI/F#..." answer
and I only knew VB.NET/C#
 
2:24 PM
Most questions are asked to solve specific problems on existing project, if a answer is given in C++ on a project that was written in C are they going to redo the project?
.NET uses the CLR, it's common between all those languages so it's easier to translate between them
Most of the time when they say C/C++ they mean C++
 
then the OP is SOL
but I give the OP enough credit when he/she asks for help that C/C++ means that it not specific to a certain a language they are just interested in an answer
by language I mean C or C++ for their particular problem
they have enough skill set to translate a procedural solution to a OO solution and vice versa
on a side note have you guys notice that stackoverflow questions appear on the msdn search?
 
I didn't notice that Shiftbit :O
Does anyone understand litbs comment on this question? stackoverflow.com/questions/4118104/obscure-c-syntax
 
"What's wrong with int a[1]; a[1, 0] = -1;?" -> "The first index is out of bounds"
 
Yeah, but a[1] isn't indexed is it?
 
no
 
2:40 PM
So it's not a problem >.>
 
It still compiles
int a[3]; a[2232, 1, 0] = -1; only the last element gets indexed
this give runtime error on debug int a[1]; a[0, 1] = -1;
emphasis on the confusion of the comma operator
 
I think he meant to write it like your last example
heh
 
3:03 PM
@Shiftbit Well yes it would be stupid to say that, when you could just say you need a .NET solution and you are currently using language X. using the .NET framework means that you can slap more or less any language together, so long as they are a .NET language. the same does not really work with C and C++, I could give a C solution that will not work with C++ and vice versa, I could give a solution in any language, and let the OP work out how to translate it to the language they are using.
 
3:17 PM
anyone into opencv?
 
@AndyJacobs ergh... I was looking into using it, but then thought it would be much for 'fun' to go from first basics and get camera data my self...
 
 
6 hours later…
sbi
9:01 PM
@James: I have seen your work on the book list and have added some of my own to it.
 
I think Barton & Nackman should be there if it isn't already.
 
sbi
I'm contemplating of creating a "Definitive C++ Frequently Asked Questions" question in the same spirit, but I fear it would be shot down immediately.
 
I found this leetle story but I don't know who she is: xkcd.com/341 ?
 
sbi
@AlfPSteinbach That question is CW, so everyone can add to it. Feel free to add it to the historical section.
 
OK, later. Thx.
 
sbi
9:05 PM
@James, oh and, BTW, The Silence of the Lambdas and Citizen Koenig actually made me laugh out very loud! (chat.stackoverflow.com/transcript/message/85657#85657)
 
Yah, liked The Silence of the Lambd :-). On the 3rd hand, I suspect my contribution about The bug in God's eye fell flat. Should I post spoiler?
 
sbi
@AlfPSteinbach It might have been good, but I must have missed it. Link to context?
(afk)
 
The Mote in God's Eye is a science fiction novel by American writers Larry Niven and Jerry Pournelle, first published in 1974. The story is set in the distant future of Pournelle's CoDominium universe, and charts the first contact between humankind and an alien species. The title of the novel is a wordplay on Luke and . The Mote in God's Eye was nominated for the Hugo, Nebula and Locus Awards in 1975. The book describes a complex alien civilization, the Moties. The Moties are radically different (both physically and psychologically) from humanity in ways that become more clear over ...
These aliens did nothing but spaghetti systems, you see.
Everything interconnected and serving multiple purposes...
 
sbi
9:30 PM
@Alf I have read Niven, but nothing of Pournelle, so I wouldn't have caught the reference.
 
@sbi: I'm pretty sure that you've read Jerry Pournelle's Chaos Manor column in BYTE magazine, yes? All about the big monitors he needed due to his bad eyesight, a bigger n' better one every month! :-)
 
sbi
10:03 PM
@AlfPSteinbach I don't think I have ever read a BYTE magazine issue. :-o
 
Well, it's long defunct now, sort of merged into Dr Dobbs Journal (which is also almost defunct) along with all the old ones like Software Development. Interestingly I managed to get letters to editor published both in BYTE and SD, but never in DDJ. Anyway, BYTE magazine was where Bjarne published his "A better C?" article introducing C++ to the masses, and it was where Brad Cox (if I remember the name correctly) published the "Silver Bullet" article about OO, a classic.
 
sbi
@AlfPSteinbach Ah, but when those where published, I very likely still was on the wrong side of the Iron Curtain, reading Lem instead of Asimov, and hacking hex digits into single-board 8080 clone machines. :)
 
Agatha?
:-)
 
Herro
 

« first day (22 days earlier)      last day (4916 days later) »