Um, there is no type BOOL in C++. There's just bool, which is a type (not a typedef), which has the values true or false.
You may be thinking of BOOL, which is a typedef in Win32. But that's a proprietary C API, nothing to do with C++.
Iago
@Iago
Best posts made by Iago
-
RE: Overheard in the next cube
-
RE: Guaging Knowledge via the Ternary Operator
There are cases where chaining ternaries is reasonable, but the syslog code there would be clearer and more maintainable if the strings were extracted into constant arrays: something like (quick hack, may be buggy)
const char* on_off[2] = { "on", "off" };
const char* status[6] = { "Auto Reboot off",
"Pinging",
"Waiting for response",
"Rebooting",
"Waiting for reboot",
"Unknown" };const char* get_status(int reboot) {
return reboot < 6 ? status[reboot] : status[5];
}syslog(LOG_NOTICE, "WebRelay %s:%d Relay: %s Input: %s Reboot: %s",
inet_ntoa(sin->sin_addr.s_addr), ntohs(sin->sin_port),
on_off[relay], on_off[!input], get_status(reboot)); -
RE: Gimp 2.7.2 Splash Screen
@The_Assimilator said:
Man, it's got to the stage where we don't even need to make jokes about Linux... its devs are doing that for us.
What are you talking about? Linux is mainstream -- it runs more phones than iOS and more servers than Windows.
GIMP, meanwhile, is no more a part of Linux than it is a part of the other platform it runs on, such as Windows.
-
RE: Windows update.
[quote user="carfield"]Ths is pretty inconvenience especially Windows will update you system sliently so if the update start and complete then restart automatically and you open few browser windows before restart, it is pretty tedious to remember where you reading now.[/quote]
Get a real browser. Opera, or Firefox 2, or Firefox 1.5 with a session-saver extension, will automatically remember where you were and let you carry on reading from where you got to. It's only Internet Explorer that is guaranteed to lose your place.
-
RE: Korean PMP developers need to learn American jargon
"Not the first thing that pops into Chahk's mind" != "not the first thing that pops into the minds of their targetted customer base".
I too am a gadget-hungry geek, but the first thing that pops into my mind when I see "S9 O2 L3" is science, not acronyms.
Latest posts made by Iago
-
RE: IOS 6 Maps
@dhromed said:
Yah, I think the 3D view goofs are unfair. It's kind of difficult to generate a 3D view of the *underside* of an object. (see chicago bean)
If your product is literally incapable of producing results that your users will not ridicule, you should possibly consider building a different product instead.
-
RE: We're In Different Timezones
TRWTF is the ludicrously unwieldy calendar and time system we've ended up with, thanks to the stupid ancients not having the foresight to predict how computers would work. I urge all of you to do everything in your power to persuade your employers to adopt stardates.
-
RE: I don't think you understand how type hinting works.
And this, folks, is what happens when people learn to "program" by bashing away in a language with a poor implementation of dynamic typing. They end up literally incapable of comprehending types and type-checking.
What Dijkstra said about BASIC was slightly unfair. BASIC at least had some concept of types. It does, however, apply perfectly to PHP, and for that reason I will never employ a programmer whose only experience is with PHP, even if the job only involves writing PHP.
-
RE: Adobe: Because more things make us ask WTF than just code
@El_Heffe said:
I don't mind Photoshop being expensive. I have always believed that if you aren't willing to buy the best tools then you aren't really serious about what you are doing. However, this new price policy seems pretty excessive. One of the great things about computer software is that it never breaks or wears out. If what you have now does what you need, you can continue using it essentially forever. I have a feeling it won't take long for Adobe to realize that doubling the price is costing them a lot of sales.
I don't even know what you're trying to say here. They haven't doubled the price for people who are willing to buy the best tools. They have removed the discount for people who are not serious enough about what they're doing to upgrade regularly anyway. Most of the people this will "affect" won't even notice, because the old version they have does what they need so they can continue using it essentially forever!
Seriously, THERE IS NO WTF HERE. What Adobe is doing is INDUSTRY STANDARD PRACTICE. Even Microsoft does it too! Why couldn't I upgrade from Windows 2000 to Windows 7? Oh, right, because this is how software upgrades WORK.
-
RE: I hate 'clever' programmers (Revenge of the Mover)
TRWTF is invoking a Perl one-liner from a CSH script, instead of writing the whole thing in Perl.
Seriously, even Perl is better than CSH.
-
RE: The Horror of the Mover
One might add that ksh was the standard shell on most Unixes, bash took over because it was the GNU version so became standard in the Linux world, and csh is an evil mess that should never have been spawned (and I still know people who use it every day, poor buggers).
There's also zsh, whick is the Dvorak keyboard / Ron Paul of shells.
Yes, I am this boring in real life too.
-
RE: Employment Screening Test
@SilentRunner said:
@jasmine2501 said:
Was it your mommy who told that "fucking" was only used as an intensifier by people with limited vocabularies? Because whoever it was, s/he was a fucking liar. Polysemy [i]enriches[/i] our language.So I click in and go to do my test, and lo and behold... it's a fucking test about basic algebra and reading comprehension!
I fail to understand what sexual intercourse has to do with the test. Or is it your limited vocabulary that is the problem?
-
RE: Construct I haven't seen in a long time
@TheCPUWizard said:
The disk being full IS an exceptional condition. So is your program not having permission to write to a directory it needs to write to. These are things that only happen when something is seriously wrong and your entire program is about to crash horribly! What the hell are you going to do after checking for them that would not be functionally equivalent to just letting the language raise an exception anyway?Exceptions are intended for EXCEPTIONAL conditions.
(Also, the argument from etymology is a logical fallacy. There are plenty of perfectly good, efficient, maintainable idioms that use "exceptions" in non-exceptional circumstances. Check out the standard library of your language of choice and be amazed at the things they are useful for!)
@TheCPUWizard said:
As I have posted before...work just once on a project that will cause your cell phone to ring everytime an exception is thrown (even if it is immediately caught) and you will get in the habit quickly.
I would immediately quit any job that tried to bring in a bullshit rule like that. Cargo-cult nonsense like "our code must never throw any exceptions!!!!!" does not sound engineering practice make. -
RE: Sometimes I'm forced to agree with Blakey
@blakeyrat said:
Yeah, compare that with the reaction you get when you put an entry in Microsoft or Apple's bug trac--OH WAIT YOU CAN'TExercise! Put in an entry in their bug tracker, see what the reaction is like. That's always an eye-opener to the efficiency and professionalism of the open source community.
This is not an argument. The average end user with a problem is SOL regardless of whether they are using open source or proprietary software. The only difference is that in one case they have paid good money for shit that doesn't work properly, and in the other case they got it for free! Guess which causes them to feel more entitled and to whine louder about the way the developers aren't dropping everything to scratch their one itch for them? Yeah, funny old world, isn't it.
-
RE: Object/Procedure-Orientation
@derula said:
Apart from the stupid idea that if sequence is and the insanity of unlockDataTables(), I really love this pattern:
That's actually very useful and sensible. When you're debugging the code, you can tell whether it's reached the end of the method or not by checking the value of rtn.boolean rtn = false;
// Snip block that might alter rtn, but never returns or uses the value of rtn
rtn = true;
return rtn;