c++ quizz!

Which of the following are not C++ expressions, and why?

1) 1*(2*3)
2) a=(b=5)
3) 1=a
4) (a=1)
5) (a=5)*(b=7)
6) (1
7) (a=b)*(b=5)
8) (a*3)=(b*5)
Comments
37
i dunno lol
i wouldnt know, but hey i'm not a nerd
2) looks odd but i dont know shit bout c++
1*(2*3)=6 np 4 me
well done computer
Parent
without knowing c++ i think its 3
because it has to be a = 1 , value has to be on right side?
Who gives a fuck?
just try it on the program
1? xD or 6 i dunno
ofc it has to be: a²+b²=c²
a²+b²=c² | ^1/2
a+b=c

trolled hard ;D
Parent
WTF FUCK U!
Parent
a²/a²+b²*b²=a+b²+²
Parent
well, I will assume a,b are numeric variables (float, int etc)

3) - afaik, number cant be a variable (variable name can contain number but cant start with one
6) - no right parenthesis = syntax error
8) - left side of assignment cannot be an expression, has to be variable
my thoughts exactly
Parent
my thoughts exactly
Parent
Can I ask what you studied?

you know sql, mysql, c++ etc
everything i currently study
Parent
I am studying general informatics, with primary focus on Java technologies (my diploma project is about using process algebras in software development, implementing CSP basics into Java through JCSP library, automatic code generation based on models and so on). But, during my studies I had to do stuff in many languages (C/C++, C#, Haskell, SQL, PL/SQL, Pascal and maybe some more I dont even remember).
In my spare time however, I am involving myself into web technologies, namely PHP for server side (got some experience with J2EE too, but for I use PHP for convenience), MySQL (its just one of many SQL implementations, there are many more like MSSQL, Oracle, PostgreSQL...) for databases, and Javascript (+jQuery) for client-side scripting.
all in all, school wont give you much, if you want to know something you gotta learn by yourself :P
Parent
nice list there :)
Parent
You can do C well?:D
If yes,plz go hook with ET SDK:D
So you can tell me how to make parachuting spawning in ET.Since my head can't handle it...
This is what a Codey said to me:
QuoteDoing the parachute is pretty easy stuff, you just need to use playerstate on the server to hold the setting of if they are currently parachuting and have a seperate flag which is sent to clients. The server uses this flag to modify the player's movement profile, gravity etc and aiming of their gun, if you want it while parachuting. The client also needs to know how to predict movement for this player.

Then if that flag is set for other clients you can see then add the parachute model the same way it does for backpacks and guns, based on the torso angles but locked vertically.

But my mind can't think it out:S
Parent
unfortunatelly, I dont really have time to look into other projects besides my school/job, so I probably wont get involved with ET SDK.
But, from what I read it seems to be simple indeed (coding wise). You just need that flag (as that guy is saying), for example you name it parachute. If parachute is 0, player is treated normaly (normal gravity, normal movement physics, normal aiming), when its parachute=1 then you can actually change some settings (as you can read in that guys response). If client recognizes its actually with parachute on (by receiving parachute flag with value 1), then you change players gravity so he wont get hurt when landing + to also fall down slower + you can change some other settings, like bigger spread, limited movement (you cant really strafe with parachute or use sprint or I dont what else can be done), limit crosshair movement (like when you have mg, you cant turn around, same would go to guy with parachute on) etc etc. But I cant give you the code itself since I have no idea of how it looks line in ETs source code.
Hope this will give you better perspective on how it can be done.
Parent
my thoughts exactly
Parent
It all depends in what context and if the variables are integers or bools.

Example: a=(b=5)
- If a is an integer then a and b will both be 5
- If a is a boolean then its a syntax error and should be a = (b==5)

3) 1=a
cannot use a number as variable so that wont work

6) (1
syntax error

8) (a*3)=(b*5)

will only work if you're trying to compare values in a test, rather than assigning a value. So it should be (a*3)==(b*5)
hey nerd
are you familiar with OO Programming?
Parent
yes, I am mainly a Java programmer so OO is something I need to focus on :D why?^^
Parent
oh just so i have someone to annoy with my questions since i'm learning how to program with objects etc. (just not using java yet but Eiffel - you've probably never heard of it ;D)
Parent
Idd never heard of Eiffel *googling* :D But yah sure, just let me know what u need ^_^

edit: just googled Eiffel... wtf syntax! :D
Parent
6- syntax error
PUUBUUUUU
6) obviously ...
Back to top