Are there logical operators in c++

Pages: 12
Say, you have two boolean variables A and B. You want to find the logical A AND B. Say A is true and B is false. Then you have another boolean variable, say C, that would hold the AND result of A and B. Can you do that?
Uh....yes? Seriously, what kind of language would it be if you couldn't do that?
C = A && B; or C = A and B;
for C = A and B; you need to #include <iso646.h>
No, you need to include it in C. ISO C++ says that and, or are keywords
Just for the record, I'm using Microsoft VC and need to include iso646.h to allow and / or.
IIRC You need to disable language extensions to have them as keywords in VC++
... or Enable "disable language extensions" as M$ puts it. :-)
Thanks Bazzy, you learn something new every day here.
Alas, not all compilers are smart enough to do the right thing. You need to #include <ciso646> if you use operator synonyms.
M$


*groans*
Is that a groan of pleasure Disch?
not exactly =P
I couldn't have written my flight sim without their SDKs. so I'm not anti-(see above company name) at all, it's just I didn't want to be seen to have typed it twice on one page ;-)
Last edited on
I didn't want to be seen to have typed it twice on one page


See... this is just as snide and irritating.

People get on MS's case because they're successful and it's trendy to depict them as the "evil empire" of the software world. When really they don't do anything that any other (successful) software company doesn't already do. In reality there are hundreds of companies that are far, far worse and don't get 1% of the flack they do.

It's like there's this middle ground of computer users who are in a sort of transition between MS and an alternative (whether it's Linux or Mac or whatever) where they think it's cool to make snide remarks about MS at every opportunity. Like it's somehow "cool" to think MS is shitty.

The "M$" crap in particular is one of the most obnoxious of their trends. It's about as imaginative as a turd, and every time I see it I just get this imagery of some clueless dweeb sitting in his parents basement chuckling to himself thinking he's just soooo clever... or that he's somehow "sticking it to the man".

It's also kind of ironic, because most of the people who make such remarks are still regular users of MS products. I've found that most of the people who take the time to actually use an alternative are beyond such juvenile tendencies -- they simply don't care about MS and use what they use without feeling the need to rag on how terrible X or Y is.

The first two panels of this comic sum it up quite nicely: http://xkcd.com/743/


I'm not MS's biggest fan, but the fact of the matter is they write software that works and has practical real world applications. Heaven forbid they actually charge money for a product they make.

And yeah some of their stuff has bugs. Show me a (useful) program that doesn't.



EDIT:

I just realized my post is quite cruel and judgemental.

I'm sorry. This is just a big pet peeve of mine.

I don't really think you're a clueless dweeb chuckling in your parents basement. But you do mindlessly follow annoying trends. You said yourself you don't have any problems with MS -- so then why do you feel the need to make such snide remarks?

Think about it, get back to me.
Last edited on
Blimey Disch that's a bit of a venting, judging someone on typing $ instead of S, I wasn't being serious!
I really do appreciate the products they supply many of which are free and well documented, I earn a living because of what they produce and I use their software, is it so wrong to type $ rather than icrosoft considering it's obviously easily recognised who is being refered to?, it's not untrue they make a packet out of the corporate sector by having their OS preloaded on every box sold, and many companies who write good software have been bought up by them, but that's business, I wasn't having a go...
I feel no need to make snide remarks and am not following mindless trends, I have a sense of humour... hmmm... maybe ties in well with the discussion in another thread about how English can be misinterpreted at times.....
They do write good software, but I've been around a good few years in the IT game (before Windows existed) and they're not the only people who have done so, so maybe Monopolysoft would have been more appropriate...? (infinate number of smilies, sorry couldn't resist it, and no bad feelings intended)
Last edited on
Moooce wrote:
judging someone on typing $ instead of S, I wasn't being serious
[...]
is it so wrong to type $ rather than icrosoft
[...]
Monopolysoft


Apparently you're missing my point.

It's like you never left Junior High -- you're one of those kids who likes <insert pop star here>, but goes out of their way to rip on them just because that's the "cool thing to do". You're not doing it because you really think it, you're doing it because it's trendy.

Does typing M$ make you feel clever? Do you have some sort of mental disease that prevents you from typing "Microsoft" twice on the same page? Or are you just being a douche bag?

If you want to keep doing it (as you apparently seem to want to, since you continue to), go right ahead. All I'm saying is.... in my eyes... it makes you look like a child who is incapable of independent thought, destroys your credibility, and makes it impossible for me to take you seriously.


But that's just my opinion. If you don't mind me having that opinion of you, then there's no problem.


EDIT:

To reiterate my previous question, which you avoided answering:

You said yourself you don't have any problems with MS -- so then why do you feel the need to make such snide remarks?


EDIT 2:

I realize I'm being moody and irrational. Here's an abridged snippit from IRC about these posts:


[19:28:17] <computerquip> Man, you are moody.
[19:28:22] <@Disch> lol
[19:28:28] <@Disch> it's a big pet peeve of mine
[19:28:29] <@Albatrosss> cq++.
[19:28:38] <@Disch> but yeah I am in a mood tonight
[19:28:57] <@Disch> I can be a big asshole sometimes
[19:29:06] <@Disch> but I'm being honest with that guy
[19:29:14] <@Disch> people that do that really do come across that way to me
[19:29:17] <@Disch> at least I'm upfront about it
[19:29:35] <@Albatrosss> That's a good quality. Sometimes. :)
[19:29:37] <@Disch> not very polite, I suppose....



So yeah -- I'm sorry for being an asshole. But I stand by my points above
Last edited on
wow...
Disch, I'm not trying to stirr you up or anything, but if you won't allow anyone to have a joke and prefer jumping to conclusions and launching into personal attacks on somebody who just made one comment, as a bit of fun at a big corporation, mutch like good friends poke fun at each other from time to time, without any true malace or following a "trend", without me saying anything bad about you or Microsoft, you know, just as a laugh, then your last sentence is true, I accept that, and I don't think your an asshole.

I did answer your question, there really is no evil or preconcieved intent behind it, it's just a well known abbreviation for Microsoft, I might just as well type $hell for a well known oil company, but it dosn't mean I think all the things you think I do about them, I think you're judging me on previous discussions you may have had with others, and it's obvious to me now that trying to be sarcasticly humorous about it did not help to deiffuse things, you are obviously more peeved about this than I ever thought anybody could ever be, sorry.

I'm not here on a professional basis or demanding serious respect, I simply wanted to learn from those who know more and help those who are wanting to learn, if your interpretation of a $ sign is more important to you than that I honestly don't know what more I can say, other than forget about it.

Regards
Moooce
Last edited on
I realize I'm being completely irrational. It's just that I see this thing so damn much and 99% of the time I shrug it off and say nothing. It's like I'm exploding all this resentment that's been building up over the years. I don't mean to attack you personally -- although I do tend to, in general, think a little less of people that do this for the above and below reasons.

mutch like good friends poke fun at each other from time to time, without any true malace or following a "trend"


If it weren't trendy or "cool" to do this, I could see this as a valid point. But far too many people have been doing it for far too long for this to have any other motive than monkey see, monkey do.

This was an old joke 10 years ago. And even when it was new it wasn't funny or clever.

it's just a well known abbreviation for Microsoft


No, it's not a well known abbreviation. MS is the abbreviation. M$ is a well known "stab at thee" joke involving Microsoft. It'd be like people calling Taco Bell "Taco Hell". It's not an abbreviation/alternate name, it's just a stupid joke, and unless you're using it to make a dig at Taco Bell, it just makes you sound like a retard.

I might just as well type $hell for a well known oil company


Except nobody does that because it's not trendy.

it dosn't mean I think all the things you think I do about them


That's the thing -- I don't think you think all those things. You said you didn't and I believe you. That's actually what my biggest beef is.

You're saying it simply to be trendy. It's not funny, it's not clever, you're not making a dig at MS.... you have no other motive. You're doing it solely to identify with a specific culture -- and I freaking HATE that culture.

I think you're judging me on previous discussions you may have had with others,


I absolutely am. Those other people I've had these discussions with are part of the culture you're trying to identify with.

If you don't want to be lumped in with them, then don't try to identify with them.

and it's obvious to me now that trying to be sarcasticly humorous about it did not help to deiffuse things, sorry.


No, you don't have anything to apologize about. I'm the one who's totally out of line here and I know it. And I'm sorry about it. I just have to get all this off my chest because this is like a golden opportunity for me to unload all this baggage and to illustrate why I have this irrational hatred for such a minor thing.

I'll undoubtedly bookmark this thread and link it to future people who play the M$ card.

You're just kind of getting caught in the crossfire on this one -- and it's extremely unfair and I really am sorry. I'm not usually this irritable.... usually I'm a pretty nice guy.
It's cool, I sometimes fly off the handle at people like this too, but have learned to tone it down as I get older, and really, at my age I'm not a pop star follower.
You obviously have a hate for that abbreviation, it wasn't meant how you initially took it, and I see you realise that now. Just have a beer or something and chill out, I'm not your enemy.
@Mooce: Yeah, don't use sarcasm on the internet, heh. You are basically guaranteed that someone will misinterpret it.
Pages: 12