« first day (63 days earlier)      last day (4902 days later) » 

12:46 AM
first time in chat..
 
am I off-base with this comment? it's not something I'm used to saying, but it sprang to mind instantly when I read that answer — and it feels right
maybe I'm misreading, and I do realize he answered in good faith, just like some people say "only use exceptions in exceptional circumstances" in good faith
@Matt: hello
 
Anyone want to help me make sense of this intro to programming assignment?
 
don't ask to ask, just ask.
(if it's too long and involved for chat, use SO or PROG)
(and then post a link here)
((but don't use (so) many parens (it's a bad habit)))
 
lol
Its just that I don't have a specific question yet
 
"what does this requirement (included below) mean?"
 
12:55 AM
(what is so?)
(Stack overflow)
 
pick out as specific of a thing as you can, show what you've tried (i.e. how you've tried to interpret it), explain how it's confusing you (to the extent you can), etc.
yes, SO
 
I have to write a program using data from a file rather than from the io stream
 
ifstream file ("filename"); int n; if (file >> n) { cout << "successfully read " << n << '\n'; } else { cout << "failed to read from file\n"; }
ifstreams are istreams, so anything you know how to do with an istream (including std::getline) can be done on them
(cin is another istream, if you haven't got that far yet)
what book are you using? what does it say about file IO and using iostreams?
 
C++ programming by D.S. Malik
 
hmm, haven't heard of it
 
12:59 AM
The file contains a gender and then a grade
then a gender and a grade
etc.
 
yup
I need to calculate for each gender
 
if you know how to read a gender and grade from cin, you can do exactly that with the file
just change cin to the fstream variable ("file" in my above example)
that should have been covered in the class and book
depending on how the gender is formatted (word, char, etc.), it could be as easy as string gender; int grade; while (file >> gender >> grade) { process(gender, grade); }
 
Will the program remeber where it is in the file?
 
yes, streams maintain their position
which advances as you read more data
 
1:02 AM
like if in my input module i have fstream >> gender >> grade;
 
don't say module, you probably mean function
 
and then later in the program check if the file still has data and if it does loop back to the input function, it will read the next line with a different gender and grade?
sorry
 
do you understand the while loop I just posted?
this is simplistic because it doesn't understand lines at all, just separating whitespace
 
M 42\nF 42\nF 42\n < this would be comming from my .txt file right?
 
space (' '), and newline ('\n') are both separating whitespace, btw
yes, codepad doesn't let you access files, so I used a stringstream with the same contents
that contents is three lines, one M and two F
 
1:09 AM
the grade is not below the gender in the file
its gender grade not gender \n grade
 
the output of that program on codepad is not supposed to match the input file format
oh, I think I see what you mean, but I think you're misunderstanding
"M 42\n" is one line, with "<gender> <grade>" where gender is M and grade is 42
 
ok ok, so you understand how the data is in the file, codepad just outputs it differently
 
the output is controlled by the program, I just did that as a sample
 
I am a little confused
 
see this modified version: codepad.org/7LzrM8CD
you see the output is on the line that starts "cout << ..."?
 
1:12 AM
yes
 
it's just repeating the input in a slightly different format to show that it read the input
inside the loop body is where you'd so whatever it is your program needs to do
 
ok, cool
 
for example, giving average grade per gender: codepad.org/C1EVSSCB
 
One of this programs requirements i am confused about is this: it says that there must be a function that opens the input and output files and then sets the output of floating point numbers to two decimal places
 
both of those should have been covered in class
I gave an example of the former above: ifstream file ("filename")
fstreams also have an open method
use std::fixed and the stream's precision method to adjust output decimal places
 
1:20 AM
Yes, I understand how to open the file but not where
 
where it needs to be opened
have you drawn a flowchart for this program yet?
 
No
 
do that.
 
Ok
 
it'll look something like [ read input ] --> [ compute result ] --> [ write output ]
 
1:21 AM
Want to clear up more general questions for me?
 
then you can break each of those steps down into smaller ones
go ahead and ask, but I'm going afk and won't answer until I get back
(someone else may answer, anyway)
 
Ill go try and make that flowchart and come back later if i need to, thanks for the help
 
 
2 hours later…
3:32 AM
@sbi Hii . Its good to be back. I missed you guys in the suspension period. Moderators weren't happy with me it seems. ;-)
 
hah, nobody's here!
:-)
 
reminds me when i was a small boy. i was going to visit neighbours' kids, and i was very polite so i knocked on their door. nobody answered. i knocked again, knowing they were having dinner. "we're not here!". well ok they don't want me, so i went home. but of course, the story later was that i believed them.
 
Lolz! :D
0
A: Are there famous developers using StackOverflow?

Prasoon SauravAlf P. Steinbach : One of the moderators of the usenet group comp.lang.c++.moderated

 
uh oh. i think that's only "usenet fame". mostly.
 
3:41 AM
I think James Kanze is also on SO. I am not sure though.
 
yes. or he was, a week or two ago.
didn't know Andrei is here.
only answered D questions.
you might check if Walter Bright also is here?
 
he's the D guy, and prime developer of Zortech C++ compiler
 
well he's famous
 
3:43 AM
So many personalities here on SO. Great!
 
maybe even Daveed?
David Vandevoorde?
 
No! he is not on SO.
 
hm. he's too famous.
;-)
 
Haha! Right. Found Eric Niebler too. :D
He has just answered 1 question.
 
@Alf lol you're wrong :)
 
3:59 AM
I don't like the new interface/design of programmers.se
 
4:21 AM
@Prasoon ohh they unlocked you!
 
4:37 AM
=)
bjarne was on SO so maybe stroustrup was on SO too
 
5:02 AM
@PrasoonSaurav: Ah ha! They let you out of the penalty box, I see!
@AlfPSteinbach If he was an active contributor, there wouldn't be any template-related questions left for Johannes to give awesome answers to!
 
@JohannesSchaublitb no, you've just encountered a Defect in the C98 standard. it's nothing more. no compilers do as the defective wording says, and next year or so it is corrected. so it's academic. problem is, your wording makes it seem like a practical issue.
 
@PrasoonSaurav Very cool. I'll have to wear my Stack Overflow shirt to the next NWCPP meeting :-D
 
 
2 hours later…
7:28 AM
@Alf I think it's a very practical issue
since the compilers don't emit an error message, it looks like there is a bug in them that might be the consequence of buffer overflow or something
 
lol
BTW when is next stackoverflow meeting
 
i didn't know that there are stackoverflow meetings
what are they?
 
there was one big round of meetings two years ago
or last year.. dunno
 
7:45 AM
nothing about oslo though
 
-.-
i would say... too late xD
 
8:43 AM
It's been discussed on meta, though I can't find where because Stack Overflow search sucks.
If I recall correctly, they plan another round or something next year.
Attendees will be required to have names longer than 15 characters, otherwise they will not be admitted into the sessions.
 
9:03 AM
your name is only 14 characters, including a space
 
I guess I wouldn't be invited. :'(
 
what is the point of that restriction?
 
I was poking fun at the ridiculous rule that comments on Stack Overflow must be at least 15 characters in length.
And on that note, I have to be at the airport in five hours, so I'm going to get some sleep while I still have time.
 
sbi
9:38 AM
@PrasoonSaurav I noticed you avoided telling us why they were unhappy. :)
@PrasoonSaurav es, he is.
 
9:59 AM
@sbi for the templog do you add the headers to your project or do you add an include reference to the project properties?
 
 
1 hour later…
11:06 AM
Of course, you all know Herb Sutter was also here
hmm i think it sucks one can't unaccepts one's own answer: stackoverflow.com/questions/4263748/…
it should be possible given 4 votes that a question becomes unmarked, if the answerer is among the voters
that's my proposal
pro / cons ?
 
11:21 AM
@JohannesSchaublitb maybe i should just delete
 
11:34 AM
@icecrime you can't as long as your answer is still marked as accepted
 
11:56 AM
oh
so I guess I just shouldn't have answered without being sure =/
 
12:18 PM
Anyone ever used QDoc? I am having problems finding a tutorial. Is it the same like Doxygen or only intended for "manually" written documentation.
 
12:39 PM
@JohannesSchaublitb did you read the C++ standard or how do you know all these things? Experience?
 
@Tony surprise, i read the c++ standard!
hehe
you mean whether i read it completely? oh, no. i left out the libraries parts. i can't stand the standard library :(
 
what's wrong with the standard lib?
 
I'm amazed too... I feel that every time I read a paragraph of the standard, I end up understanding something slightly different
 
maybe I should read more of the standard
lol
 
I would need a month per page and a code sample per sentence to reach your understanding =|
 
12:45 PM
yea, it seems like @JohannesSchaublitb is a second Bjarne...
 
(SO can be depressing sometimes :-))
 
hehe
 
ohh i'm just reading the standard like 3 hours a day. i'm lost wrt real life :)
2
so it's not something you should head for exactly lol
 
1:04 PM
I've only read the standard once when I started my first C++ job 4 yrs ago
I've started a new reading a few weeks ago, now with experience, pen and paper :)
but I have a very hard time making sense of every sentence
(and I actually believe that mastering my everyday tool is something I should be heading for :)
 
just updated my user page with some "standardese" answers for your pleasure
lol
@icecrime BTW i got your message. didn't have the time to respond yet tho xD
 
I just got my answer :p
 
hehe
hm prasoon seems to have significantly cut down his user page information
he had links to his faqs and favourite answers before.
does this have something to do with that he was locked?
 
1:19 PM
the book "The C++ Programming Language", is that like the standard on paper or is that just a book?
 
1:38 PM
@JohannesSchaublitb Since he hasn't said why he was in the penalty box, the only responsible course of action for us is to make wild guesses and assume the worst! :-D
4
@Tony It's just a book. It's nothing like the standard (ok, I can't say that with certainty; I don't own TC++PL and have never read it, but if it was anything like the standard it wouldn't have sold so many copies.)
@icecrime Good luck. Let me know when you are able to make sense of every sentence, because I will be truly impressed :-D.
yawn
 
@JamesMcNellis I usually timeout after reading 10 times the same paragraph and still not getting the point
 
@icecrime: One approach is to post on Stack Overflow your best guess of what it means and wait for @JohannesSchaublitb to drive-by-comment with a correction of what it really means :-D
 
I've considered this approach, but some would call it spam :)
 
1:57 PM
Well, I've got to get to the airport.
Later, all!
 
 
1 hour later…
2:59 PM
are there any good posts etc on here about turning a statlic lib to a shared mfc dll?
my interfaces for the api are const c style strings
i have a static lib that i used already to create my own static lib. but now that i need to create a mfc shared dll how would i do that given that i need to use this third party static lib to do so.
 
 
5 hours later…
8:20 PM
anone here
anyone here
 
no, nobofy hrtr
you're probably still struggling with your MFC DLL
 
well i found something
mfc80.dll and msvcr80.dll
they party is complaining that for some reason
my code was built with that even though i am not using any mfc
how do i remove that option from vs2008 because its somehow getting in there
any idea
they still want a static lib or they want a shared dll with mfc since they thought i was using mfc which i am not
 
i'm sorry it takes some time to answer you because microsoft update kicks whenever i've been away from PC for some time and start doing something
i probably have a rootkit
but anyway, if your static lib didn't use MFC, no reason why your DLL should either
the dlls you list are respectively mfc and runtime lib
probably your code does absolutely not need dependency on mfc
 
well i am wondering if somehow those files i getting in
 
you're not using mfc, are you?
 
8:28 PM
nope.
 
then you don't need dependency on mfc
you do need dependency on runtime lib and you get that sort of automatically
 
so how do i remove it when i am building it in vs2008?
 
what exactly are you building
 
i have a third party static lib upon which i do some stuff but i wanted to kind of hide that from the people i was going to give this to so i put my static lib on top of that one
no big deal it all wrks however the only thing is that when they try to link they get errors that its using mfc
so all i need to do is rebuild my static lib
 
well perhaps it is using mfc then
 
8:31 PM
without the mfc files mfc80.dll and msvcr80.dll
hmm you mean in the third party lib?
 
you do need the latter
yes
it's long time since i did but search msdn for "restristributables"
 
so i think if i that is the case then maybe i can just rebuild the lib with the option
Use MFC in a shared DLL
maybe that will solve the issue
 
that's exactly what brings in dependency on MFC dll...
:-)
try not using MFC
 
well my static lib does not but if the third party static lib i am dependant on is using it then i have no choice right?
 
8:38 PM
is there a way to find out if the third party lib is using it?
cuz i think its all obj files
 
don't know if dumpbin will tell you
perhaps
but you can just make minimal program using the lib and then check with dependency walker
 
ok i will try that. is that part of vs2008
 
ah, dumbin has option /dependencies. but i need to reboot this machine. :-)
 
it makes me wonder why mscvr80.dll which is the release CRT no mscvr90.dll.
not*
 
huh you're using msvc 8.0 that doesn't give 9.0 dependency
 
8:43 PM
that is why i am wondering why that is in there.
 
but all that stuff is total mess
microsoft fouled it up, starting with windows 2000 and "side-by-side" support
 
yuck!
 
so, only thing i can advice is to try very simple things. when work, can apply to real thing
yes?
 
i will try building without MFC and see what happens. then if that does not remove
those files i will have to build it as a shared dll i presume
 
note you will get dependency on some runtime lib
you can't remove that
at least not easily
but if 3rd party lib isn't using mfc you dhouls be able to get rid of mfc
machine is taking long pauses so must reboot
bye
 
8:52 PM
side by side support was added with windows 5.1, otherwise known as xp
and if people just took the time to work out how it worked, they'd realize its the greatest thing since sliced bread
 
9:28 PM
well they started with "DLL Hell" and ended with "obfuscated DLL Hell"
 
the hell with sxs is just figuring out how it works. its 7 years now since they released it, and it is not well documented at all. i think they didnt want to document it at the time as, well, it was their big - abandon native dev and try and pretend everyone will move to .net
that said, if you have a situation where you have an application using components, that in turn depend on other components, sxs is the only way to resolve the multiple conflicting version dependencies that would arise.
but again, c++ has no defined abi, so talking about the consequences that can only result from binary level interop is ot for this group :P
 
it's OT because c++ programmers don't have to deal with binary level interop?
(that doesn't make sense to me)
 
10:36 PM
I think this question illustrates a problem with Stack Overflow. people who try to google up answers will in this case be directed to the worst possible answer.
 
11:01 PM
@Alf P. Steinbach: It's a bad question because the asker didn't ask the question that he really meant and hid relevant details about what he was trying to do. Another waste of time that I've been sucked into.
2
 
yeah, I've noticed that more and more; answers where it's hard to tell they're wrong unless you already know the right answer
like this recent question: stackoverflow.com/questions/4480316/…
two different people saying os.access's testing of real IDs is the same as testing effective IDs; seems pretty simple, but there's much confusion in the question
then you get comments like the second here: stackoverflow.com/questions/4480278/…
 

« first day (63 days earlier)      last day (4902 days later) »