Basic operators in C++

This is where members can submit tutorials that they have created on any computing related subject.

Basic operators in C++

Postby Shadowed Cipher » Thu Aug 12, 2004 10:51 am

Basic operators in C++

Operators are a form of data manipulation in C++.
They are usually used to take out arithmatic operations in your programs,
but they also are used to compare things.
You need some basic knowledge of variables and basic i/o in C++
to understand this guide.

Below is a list of arithmatic operators.
Operators in C++ come in the form of symbols.

Operator - Action

+ - adds variables and values

- - subtracts variables and values

/ - divides variables and values

* - multiplys variables and values

++ - adds one

-- - subtracts one

== - equal to

!= - Not equal to

< - less than

> - greater than

<= - Less or equal to

>= - more or equal to


Now lets examine this table

So from the first operator (+) on the list to the sixth operator on the list (--) are all arithmatic operators and the rest below it are comparing operators.Untitled 1

Comparing operators are used in loops and decision making.
like.

if(a == 9) // If a is equal to nine do these statements.
{
statements;
statements;
statements;
}

Now heres an example of arithmatic operators

int main()
{
int one; // Declairs variables
int two;
int out;

one = one == 10; // Gives int one a value of 10;

two = two == 40; // Gives int two a value of 40;

out = one + two; // Gives int out the value of int one and two added together

cout << "One and two added are:" << out; // Outputs int out;
return 0; // Exits the program
}


This now concludes my guide to basic operators in C++

Guide writen by Shadowed Cipher
The hitman hired by linux to assasinate bill gates approched the door of room bill had rented.He saw the door was slighly ajar.He pushed it open and was astonished to see bill gate already lying dead. Looks like machintosh beat him to it.
User avatar
Shadowed Cipher
Hacker in Training
 
Posts: 76
Joined: Wed Aug 11, 2004 7:54 pm

Postby Shadowed Cipher » Thu Aug 12, 2004 10:52 am

Sorry for the "untitled 1" i dont have a clue where it came from.
The hitman hired by linux to assasinate bill gates approched the door of room bill had rented.He saw the door was slighly ajar.He pushed it open and was astonished to see bill gate already lying dead. Looks like machintosh beat him to it.
User avatar
Shadowed Cipher
Hacker in Training
 
Posts: 76
Joined: Wed Aug 11, 2004 7:54 pm

Postby Shadowed Cipher » Thu Aug 12, 2004 10:53 am

Please post what you think of this guide here
The hitman hired by linux to assasinate bill gates approched the door of room bill had rented.He saw the door was slighly ajar.He pushed it open and was astonished to see bill gate already lying dead. Looks like machintosh beat him to it.
User avatar
Shadowed Cipher
Hacker in Training
 
Posts: 76
Joined: Wed Aug 11, 2004 7:54 pm

Postby g0ra » Thu Aug 12, 2004 10:59 am

Do you not know how to edit your posts? I'm personally getting a little sick of your repetitive posting, especially where you could simply edit your previous post to add a new comment. The term 'post-whore' suddenly springs to mind.

Do put a stop to it, as I really don't want to have to report you're unnecessary posting habit to a forum administrator.

While I'm here, you're so called tutorial is shite. The word tutorial derives from the word 'tutor', to teach someone. I'm afraid I'll have to tell you that the above article doesn't do this, is simply lists a few simple operators. It's not exactly ground-breaking is it?
g0ra
n1gg1337
 
Posts: 309
Joined: Sat Mar 27, 2004 4:35 am

Postby Prism » Thu Aug 12, 2004 11:13 am

you're missing a few operators ( eg. && || ! ) you also might include the shift operators(eg. << >>) and maybe ternary (?) as well.

you should include operator precedence too :idea:
User avatar
Prism
Owns you
 
Posts: 1618
Joined: Thu May 06, 2004 9:18 am

Postby Shadowed Cipher » Thu Aug 12, 2004 11:14 am

What the hell?
No cunt told me you could edit your posts.
Aand just whats wrong with my tutorial?
It explains very well and gives example source code.
Theres nuthin wrong with it.
The hitman hired by linux to assasinate bill gates approched the door of room bill had rented.He saw the door was slighly ajar.He pushed it open and was astonished to see bill gate already lying dead. Looks like machintosh beat him to it.
User avatar
Shadowed Cipher
Hacker in Training
 
Posts: 76
Joined: Wed Aug 11, 2004 7:54 pm

Postby Shadowed Cipher » Thu Aug 12, 2004 11:15 am

Prism the tutorial is called
*Basic* operators in C++
i dont wanna start going into shit like that
The hitman hired by linux to assasinate bill gates approched the door of room bill had rented.He saw the door was slighly ajar.He pushed it open and was astonished to see bill gate already lying dead. Looks like machintosh beat him to it.
User avatar
Shadowed Cipher
Hacker in Training
 
Posts: 76
Joined: Wed Aug 11, 2004 7:54 pm

Postby g0ra » Thu Aug 12, 2004 11:21 am

So he continues to post another two replies one after another. I give up.
Theres nuthin wrong with it.

...yup, and there is nothing right with it.
g0ra
n1gg1337
 
Posts: 309
Joined: Sat Mar 27, 2004 4:35 am

Postby Prism » Thu Aug 12, 2004 11:22 am

you f***ing did it again, nobody should have to tell you that you can edit your posts.. the edit button to the right of your post should be obvious.

Why would you make a tutorial just for basic operators anyway? they're very similar in every programming language
User avatar
Prism
Owns you
 
Posts: 1618
Joined: Thu May 06, 2004 9:18 am

Postby g0ra » Thu Aug 12, 2004 11:25 am

Totall agree with you Prism. I doubt I'm going to give this guy the satisfaction of replying to anymore of his topics, so please feel free to continue the fight to try and convince this guy to edit his damn posts ;)
g0ra
n1gg1337
 
Posts: 309
Joined: Sat Mar 27, 2004 4:35 am

Postby Shadowed Cipher » Thu Aug 12, 2004 1:46 pm

Its because i hadnt seen your post prism because my page wasnt refreshed
and then i forgot
F*** sake i wont do it again.
Whats the big problem anyway
The hitman hired by linux to assasinate bill gates approched the door of room bill had rented.He saw the door was slighly ajar.He pushed it open and was astonished to see bill gate already lying dead. Looks like machintosh beat him to it.
User avatar
Shadowed Cipher
Hacker in Training
 
Posts: 76
Joined: Wed Aug 11, 2004 7:54 pm

Postby IceDane » Thu Aug 12, 2004 2:01 pm

Dude, if you're looking to talk shit, here ya go:

You f***ing cunt!
Nobody f***ing told me I could f***ing edit my f***ing posts, you f***ing braindead, piece of shite!

I just like a f***ing average person that can see what's in front of my bloody nose!

And the f***ing big problem is that hackerthreads don't just have infinite space to host their f***ing site on.

Not all the fucks in there, they're there for you to realize how stupid you sound.
I hope I pissed you off.

Disce aut Discede
Ex scientia vera

Code: Select all
while( flamingPeople(ON_INTERNET) )
{
   ePenis++;
}
User avatar
IceDane
Because I Can
 
Posts: 2652
Joined: Wed May 12, 2004 9:25 am
Location: In your memory, controlling your EIPs

Postby xpert » Thu Aug 12, 2004 2:12 pm

Shadowed Cipher wrote:Its because i hadnt seen your post prism because my page wasnt refreshed
and then i forgot
F*** sake i wont do it again.
Whats the big problem anyway


You could delete your double posts now, just edit your original posts :wink:
The straight up big problem is that it's gay it also makes you out as if your simply wanting post count, not the info your asking for.

Well at least it looks like this in my eyes, unsure for what others think.

-xpert
I'm back you crazy mofo'z.
User avatar
xpert
Sargeant at Arms
 
Posts: 230
Joined: Thu Aug 05, 2004 12:29 pm
Location: Unsure..

Postby infinite_ » Thu Aug 12, 2004 2:16 pm

Basic operators are pointless if you don't have all the information (Prism's post).

There's nothing incorrect about the information you gave, but then it's not really a tutorial worth talking about since it's so tiny and not even complete.

--v0idE
My effort to help you will never exceed your effort to explain the problem.
User avatar
infinite_
Bat Country
 
Posts: 1353
Joined: Fri Jun 04, 2004 7:19 pm
Location: Australia

Postby Shadowed Cipher » Thu Aug 12, 2004 4:04 pm

i sad F*** once on that message you idiot.
and expert you cant delete posts.
The hitman hired by linux to assasinate bill gates approched the door of room bill had rented.He saw the door was slighly ajar.He pushed it open and was astonished to see bill gate already lying dead. Looks like machintosh beat him to it.
User avatar
Shadowed Cipher
Hacker in Training
 
Posts: 76
Joined: Wed Aug 11, 2004 7:54 pm

Postby xpert » Thu Aug 12, 2004 4:10 pm

You can if its your last post to date.
I'm back you crazy mofo'z.
User avatar
xpert
Sargeant at Arms
 
Posts: 230
Joined: Thu Aug 05, 2004 12:29 pm
Location: Unsure..

Postby Prism » Thu Aug 12, 2004 4:18 pm

you can delete your posts if nobody has replied to them
User avatar
Prism
Owns you
 
Posts: 1618
Joined: Thu May 06, 2004 9:18 am

Postby little miss demosthenes » Thu Aug 12, 2004 4:24 pm

In fact, you can delete all of your posts if you're going to talk to some of my friends like that.
The key to everything is to give everything up, but not feel any loss.
User avatar
little miss demosthenes
Strike 1
 
Posts: 225
Joined: Thu Aug 05, 2004 8:31 pm
Location: turn around -180 degrees, imbecile.

Postby Shadowed Cipher » Thu Aug 12, 2004 4:49 pm

How do i?
The hitman hired by linux to assasinate bill gates approched the door of room bill had rented.He saw the door was slighly ajar.He pushed it open and was astonished to see bill gate already lying dead. Looks like machintosh beat him to it.
User avatar
Shadowed Cipher
Hacker in Training
 
Posts: 76
Joined: Wed Aug 11, 2004 7:54 pm

Postby matt » Thu Aug 12, 2004 4:50 pm

you should see an x in the top right of your post.
User avatar
matt
Challenge Winner [1x]
 
Posts: 772
Joined: Sun Jul 18, 2004 1:19 pm
Location: u.kingdom Manhood: large

Next

Return to Tutorial Submission

Who is online

Users browsing this forum: No registered users and 0 guests