« first day (290 days earlier)      last day (4667 days later) » 

4:01 PM
lol
 
Is there a C++ version of ungetc?
 
@FredOverflow Migrated to StackOverflow.com
 
that was quick. link?
 
@TonyTheTiger Just my mother
 
that was a joke, but is there a C++ "version" of getc()?
 
4:04 PM
yeah, it's char c; stream >> c;
 
@DeadMG oh ok
 
and the puppy, of course
 
@DeadMG I'm talking about istream::get
 
yea sure
 
@FredOverflow istream::putback?
 
4:05 PM
@0A0D Why would you do that when >> is a perfectly good means?
 
Als
@FredOverflow: You may use peek to check the character without retrieving it
 
@DeadMG I didn't write the Standard Library, ask them
 
IOStreams design is more than a bit horrific
 
@DeadMG Very agreeable puppy. Puppies usually don't sit still for being wrapped up.
 
0
Q: Is there a C++ version of ungetc?

FredOverflowIs there a C++ version of ungetc? That is, can I put a character back onto an istream?

@MartinhoFernandes damn, too late :)
 
4:07 PM
8
Q: Difference between putback() and unget()

DeadMGI'm using a Standard iostream to get some input from a file, and I'm confused about unget() versus putback(character). It seems to me from the documentation that these functions are effectively identical, where unget() just remembers the character put in, so I'm nervous. I've always used putback(...

 
Does anyone have the final C++0x standard and the C++03 and the C99 standard? There's a small dispute about the implicit return value of main: In N3242 it says 0, not EXIT_SUCCESS, but I can't check any of the official standards...
 
Als
@KerrekSB: Final C++0x?
 
@TonyTheTiger cool. C++ stuff? ;)
 
Als
That is yet to be officially released!
 
@Als N3290.
 
Als
4:10 PM
@MartinhoFernandes: We discussed the other day about google search giving the download link, did'nt we
:)
@KerrekSB: Google can and will get you both...
 
@KerrekSB I stay out of those silly arguments
 
@DeadMG See my comment/question on this answer
1
A: Difference between putback() and unget()

tomaszIt's not the answer you probably expect, but want to introduce my reasoning. Documentation stays that the methods putback and unget call streambuf::sputbackc and streambuf::sungetc respectively. Definitions are as follow: streambuf::sungetc Moves the get pointer one character ba...

 
sbi
@TonyTheTiger And his sister (from right to left).
 
@Als Are you saying I can find downloadable copies of the standard via Google??
 
@jalf I wish, for .NET
 
Als
4:13 PM
@KerrekSB: Yes Officially you did'nt hear it from me though ;)
 
but you know, I'm not very confident that I can get a C++ job with my skill
 
sbi
@DeadMG Actually that skips whitespace.
 
most C++ jobs have very high requirements
esp in Britain
 
Als
@sbi: What? Tiger where?
 
sbi
@KerrekSB No, we are not saying this. You might try anyway, though.
 
4:14 PM
@sbi Hehe, thanks :-)
 
any kittens?
 
sbi
@Als The code @Dead wrote. It skips whitespace. I think getch() doesn't do that.
 
Als
@sbi: Made me change my bold Yes :P
 
sbi
@Als Why did @Dead's code made you change your Yes?
 
Als
@sbi: No I meant your comment about Tiger and his sis..
And your comment We are not saying this. You might....
 
4:16 PM
@Als My parser failed. Als, are you channeling Yoda?
 
sbi
@Als You might want to learn how to refer to specific messages. The newbie hints explain that.
 
Als
@sbi: hmm
 
@Drahakar huh? lol
 
sbi
4:18 PM
@Xaade <phone_support_voice> Thank you for calling the C++ chat room's support hotline. Do you have the newest version of the parser installed? </phone_support_voice>
@0A0D I have no idea what that is talking about.
But I would like you all to vote on this.
 
@sbi Invalid flags are in black text, hard to read
 
@TonyTheTiger sorry, I was just hearing his voice calling for a vote. Too much simpsons in my childhood.
 
@TonyTheTiger I doubt it'd be a problem. But .NET can be fun too. I hope you get it
 
sbi
@0A0D What "invalid flags"?
 
@sbi When you flag something, if a mod says it is invalid then it shows "Invalid" on the Flag Weight page
 
4:20 PM
Is N1124 the final C99 version?
 
@sbi <user_reply> It appears as if I installed only the American parser? The international one won't install on my Egomerican OS </user_reply>
 
@sbi You know you can see the rep as a tooltip in the user name on that popup?
 
sbi
@0A0D Ah, now we're getting somewhere. Where would I find that "Flag Weight page" thing?
 
No wait, is 1256 the final version? They're all called "draft"
 
@sbi Click on your user name to go your user page. It is on the left, under your avatar
 
sbi
4:21 PM
@MartinhoFernandes Darn! Post that as an answer and I'll accept it.
 
sbi
@0A0D Ah, now I see watcha talking about! Thanks.
Please all upvote Martinho's answer!
 
I did not know that
 
@sbi: added free-hand circles!
 
sbi
@hexa What are you talking about?
 
4:27 PM
@sbi about martinhos answer
 
sbi
@hexa Of course, you didn't, he had just written it seconds before I posted that link! This is why I posted it, after all!
 
@sbi Ok! I did not know about the popup's tooltip of the user name!
You guys stop behaving like compilers pls!
 
sbi
@hexa Ah, that. I didn't know either.
Jul 30 at 12:01, by sbi
@FredOverflow This is the C++ room, remember? Picking nits is what we do for a living.
 
Syntax error syntax error syntax error.
 
@jalf Thanks man :)
 
4:31 PM
we should talk strictly in C++ syntax
 
"Please don't!"
 
is VS premium > professional?
 
and be awesome
 
then someone could compile the chat
 
4:31 PM
@jalf I think so
 
"String literals make it too easy."
 
{ 'Y', 'e', 'a', 'h' }
 
@Als Also final C99 and C++03 if possible. I believe the Wikipedia links are all only for early drafts. Now I'm trying to look a bit harder, but I want to be sure what I'm looking for! :-)
 
yeah, just found an overview
 
4:33 PM
@KerrekSB So, did you figure out about EXIT_SUCESS?
 
good grief, the Danish translations are horrific
 
By final C++0x you mean the FDIS?
 
dear Microsoft, if you can't translate a text, leave it in English
5
 
@jalf It is automated translation probably
 
@hexa C99 (1256) and C++0x (N3242) are definite about returning 0.
 
4:34 PM
@jalf They translate exception messages. What would you expect from their site?
 
@KerrekSB Is EXIT_SUCESS a posix macro then?
 
The point is that returning from main calls exit(). You should only pass EXIT_SUCCESS to exit().
 
@hexa No, EXIT_SUCESS isn't.
 
Translating error messages is a cruel thing to do. It prevents me from googling the original english message.
 
@hexa No, it's in the standard, but it's for use after or around main via exit(), I believe.
 
4:35 PM
@hexa No it is in cstdlib.
 
So what happens is that if main returns 0, then the runtime signals success.
But if you call exit(EXIT_SUCCESS), you bypass returning from main.
 
No, EXIT_SUCESS isn't in cstdlib.
 
Im confus
 
Am I doing this nitpicking thing right?
@0A0D That's not EXIT_SUCESS.
 
4:36 PM
 
@MartinhoFernandes It is according to cplusplus.com.
 
Don't quote from cplusplus.com because it has a bad reputation around here.
 
That's not EXIT_SUCESS. Apparently I'm not doing the nitpicking correctly.
 
@MartinhoFernandes LOL
 
sbi
@jalf The German translation of the IntelliMouse driver for many years asked whether it should put a keyboard shortcut onto the desktop. Can you imagine the confused and horrified look on my mother's face when I tried to walk her through a simple installation?
 
4:38 PM
Third time the charm.
 
@MartinhoFernandes you're like my compiler.
 
0
Q: How to get over losing pennies all the time?

BraveyardI will be working for a company where they are programming for Financial Institutions and I will be working with money a lot. Before that it wasn't a major concern for me because I've been doing small money things and Double was enough at some point but now even 1 penny is darn important. I thin...

 
The way to SUCESS!
 
Als
@KerrekSB: All final versions
 
Using penny as your smallest integral unit is a start.
 
sbi
4:40 PM
@jalf The worst, however, is translated compiler error messages. When they translate C++ keywords, it makes me want to run screaming. I switched to strictly using English versions of compilers more than a decade ago.
 
@0A0D aren't .NET decimal types fixed point integers instead of floating point integers?
 
@sbi What? They translate keywords?
 
their VS comparison page tried to translate "unit testing"
 
@sbi ugh :( I could never handle Dutch compiler messages.... yuck
 
@TonyTheTiger No, they're still floating-point. Just decimal, instead of binary.
 
4:41 PM
@MartinhoFernandes oh I see.
 
Als
@sbi: How to vote on the rep display thingy on meta?
 
sbi
@StackedCrooked Gas stations usually price gas something like €x.46.9 here.
 
@MartinhoFernandes there aren't many professional translators with a background in software development, so presumably, they get someone who knows nothing of programming to do the translation, and then they just assume the result will be good.
either that, or google translate
 
sbi
@MartinhoFernandes I distinctly remember Borland's C++ Builder doing that.
 
In C++ I would write a wrapper class that behaves like a number but internally stores two numbers (fraction).
 
4:42 PM
Let's say I'm currently passing a ton of binary data in a network transfer. However, I'm sure that converting the binary data into a custom object would result in less memory (I can remove unused portions because the binary data uses fixed field lengths, etc). I'm sure that an object has header data associated with it, can I copy an object's data over a network connection. Wouldn't that invalidate the header data?
 
MS compilers don't translate keywords AFAIR.
 
@jalf you'd hope for a company like Microsoft, whom do have plenty of resources, that they bother to check the results of translations.
 
@sbi I don't remember Borland doing that
 
sbi
@0A0D You ever used the German version??
 
@TonyTheTiger I've hit too many incomprehensible .NET exception messages to believe that.
 
4:43 PM
@TonyTheTiger but how? That'd require them to hire proficient C++ developers who speak every language ;)
 
Als
Why people can't seem to stop upvoting this.
 
@sbi Yes, I worked for a German company
 
Als
110
A: Is 0 a decimal literal or an octal literal?

AlsYes, 0 is an Octal literal in C++. As per the C++ Standard: 2.14.2 Integer literals [lex.icon] integer-literal: decimal-literal integer-suffixopt octal-literal integer-suffixopt hexadecimal-literal integer-suffixopt decimal-literal: nonzero-digit decimal-lit...

 
sbi
@Als On meta, upvoting a question means "I agree with this question", downvoting means "No, I don't want that." But there's no need to upvote the question anymore. Rather upvote @Martinho's answer.
 
@MartinhoFernandes kinda sad :(
@jalf basically yes, and I expect nothing less :)
 
4:44 PM
@Als Wow
 
@als grats on great answer badge :D
 
Als
@sbi: Ah okies
 
Surprised that's not community wiki by now
 
sbi
@0A0D I think I worked with BCB4 back then. I could be off one version in either direction, though.
 
Als
@0A0D: That Q is now embarrassing me a bit
 
4:45 PM
@sbi I was working with BCB5 for 4.5 years
 
@Als All you really said was "Yes" lol
but don't be embarassed
 
@0A0D BCB????
 
@TonyTheTiger Borland C++ Builder
 
oh i see
 
4:46 PM
0
Q: How do C# objects get sent over a network transfer without invalidating header information

XaadeDoes a C# object have any header data that is relative to its current machine and process, and if so, how does this object transfer over a network connection without invalidating this kind of data?

 
Borland Crap Builder.
 
It's like Delphi but for C++ GUI Applications
 
Als
@MartinhoFernandes: I had the standard open since i was referring something and this Q came up & all i did was put the standard quote
 
uses Delphi for the GUI templates
 
@TonyTheTiger for such a big company, Microsoft is stunningly US-centric. It really is amazing how little effort they put into catering to the non-US/english part of the world
 
4:46 PM
Are Borland compilers still a horrible disaster of nature?
 
Als
the crowd mentality in upvoting/downvoting in SO is despairing
 
Or... something. That wasn't English, that was state of my mind after a day of work.
 
@CatPlusPlus The code we wrote using BCB is being used in Parking Garages around the US :)
 
@Als Oh, I get you. You're sad it's now your best answer, and it's not that special.
 
4:47 PM
and its still kickin!
 
Ignore the fact that the question involves C#, I really want to know a more generic answer. It's just that my solution will use C#
 
@0A0D Yeah, but did they switch to C++ from Borland++.
 
Als
@MartinhoFernandes: Yes :( There was not much to answer in it anyways
 
@Als Same crowd mentality that causes 100 people to push everyone over the edge of a balcony in a stadium during a "riot".
 
@Als OK, excuse me while I go and do some unrelated reading :-)
 
4:48 PM
-1
A: telnet client using c, for automating the backup of a series of routers

mitch_feasterI know this is kind of avoiding the question, but I really think C is the wrong tool for the job (automating system administration tasks). It would be easier to use Python's telnetlib, even if you have to spend 30 minutes learning a little Python to make it run. Check out how easy it is (taken fr...

 
sbi
@CatPlusPlus They weren't that bad until they lost the race for standard compliance by sheer stupidity. Earlier versions were much more standard conforming than their VC counterparts.
 
so like, this guy says: man, C sucks dude. use python. I don't care if you know it or not
 
Als
@KerrekSB: Hope you found what you were seeking :)
@Xaade: Yeah, some remarkably nice answers don't get any upvotes just because there are none on them already
 
He's right, though, C doesn't buy anything here.
It's faster to use something not horribly limited.
 
@Als I've got some too.
2
A: Data structure for Settlers of Catan map?

Martinho FernandesA simple structure to store an hexagonal grid when you care only about hexagons, is a matrix, with an hexagon at (x,y) being a neighbor of hexagons at (x, y±1), (x±1,y), and (x±1,y+1) for even xs or (x±1,y-1) for odd xs. We can evolve this idea to allow fast lookup of edges and vertices. You add...

Too much effort for two measly upvotes :(
(Yes, I'm fishing for more :)
 
4:52 PM
There you go, you repwhore.
 
Wow, it worked!
 
Als
@MartinhoFernandes: Not that I am in to gaming but +1 for the effort...I tried to read but ave up halfway i admit.
 
0
Q: Defering FILE flush to when the file is closed

MetallicPriestI want to defer flushing the contents of the FILE* to when fclose is called. In other words, I only want to write to disk when fclose is called and keep buffering the contents until then. Is it possible to do that with FILE* or I need to write my own code?

 
-3
Q: How do C# objects get sent over a network transfer without invalidating header information

XaadeDoes a C# object have any header data that is relative to its current machine and process, and if so, how does this object transfer over a network connection without invalidating this kind of data? [answered] Can I directly copy the binary data of an object across a network connection to another...

I almost have the answer I need.
At this rate of downvoting, I think I'm just going to edit this thing into community wiki
 
Happy WiFi day!
 
4:56 PM
@0A0D Smells like stupid attempt at optimisation, disregarding OS-level buffering.
 

« first day (290 days earlier)      last day (4667 days later) »