C++

Anything and Everything about Uplink

Moderators: jelco, bert_the_turtle, Chris, Icepick, Rkiver

Chad Mulligan
level2
level2
Posts: 127
Joined: Sat Jan 05, 2002 4:56 am
Location: Mountain View, CA

Postby Chad Mulligan » Mon Nov 18, 2002 5:28 am

Sonnybobiche --

Code snippet?  For what it's worth, there are practically no subtleties about C/C++ if statements.

Code: Select all

if (condition) {
  something-to-do-if-condition-is-true
} else {
  something-to-do-if-condition-is-false
}


is a pretty clean structure.  Mind you, some people get burned by mixing up '==' and '=' in the the condition expression... reasonable compilers will warn you about that sort of thing (e.g. if using gcc, use -Wall, -ansi and -pedantic to catch a lot of bogosities).
"I tell you three times..."
Stewsburntmonkey
level5
level5
Posts: 11553
Joined: Wed Jul 10, 2002 7:44 pm
Location: Nashville, TN
Contact:

Postby Stewsburntmonkey » Mon Nov 18, 2002 5:29 am

I think AnthonyS was just trying to say, in his own special way, that VB is much less efficient than assembly.  Its a valid point.  

Sonnybobiche, what is so hard about an if statement?  Your logic must be off.  I bet if you post the statement in question someone can find the problem.  :)

Chad Mulligan: I would just like to point out how badly the Titans beat the Steelers.  Up until the end there it was a complete rout.  I am sorry about Maddox, he seems to be OK though so hopefully. . . :)

(Edited by Stewsburntmonkey at 11:44 pm on Nov. 17, 2002)
Sonnybobiche
level3
level3
Posts: 432
Joined: Mon Dec 24, 2001 1:12 pm
Contact:

Postby Sonnybobiche » Mon Nov 18, 2002 6:37 am

Yep... it was the damned ==. I just had an = sign.
Then i thought it was working great until it just stopped working on the else if. That turned out to be caused by a " \n" in a cin statement. (I have no idea why I did that.)
Now the thing works like a charm. Thanks, though.
If at first you don't succeed, skydiving is not for you...
BlueScreen
level2
level2
Posts: 168
Joined: Mon Mar 11, 2002 11:53 am
Contact:

Postby BlueScreen » Mon Nov 18, 2002 6:34 pm

Java, better than c/c++ ?

no way,
yes, java is a lot more portable than other languages

BUT

java is very slow when it comes to writing large programs
(did anyone hear of corel office for Java?
- it got canned because it ran too slowly)

also there is no direct memory (RAM) access for java, you have to rely on the machines garbage collector to clear any un-needed parts of the program from memory

if you want to read a couple of articles on the language go [url="http://dir.salon.com/tech/col/garf/2001/01/08/bad_java/index.html"]here[/url] or [url="http://www.javaworld.com/javaworld/jw-02-2001/jw-0202-javasalon.html"]here[/url]

(Edited by BlueScreen at 5:36 pm on Nov. 18, 2002)
Since we cannot know all that there is to be known about anything, we ought to know a little about everything.  Blaise Pascal (1623 - 1662)
<damn 255 char sig limit>
AnthonyS
level5
level5
Posts: 1943
Joined: Sat May 25, 2002 7:32 pm
Location: Southampton, UK
Contact:

Postby AnthonyS » Mon Nov 18, 2002 9:33 pm

Thankx Stewsburntmonkey.
Listen to him. If you have a question, HE KNOWS THE ANSWER!!

Return to “General”

Who is online

Users browsing this forum: No registered users and 2 guests