|
| 16 Sep 2011 11:47 AM |
| Which one should I attempt to learn? Please give reasons why. |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2011 11:58 AM |
| You could just learn both so you can hack better and stop being a script kiddie. |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2011 12:10 PM |
| In that case which one first? |
|
|
| Report Abuse |
|
|
xHTMLx
|
  |
| Joined: 10 Feb 2011 |
| Total Posts: 4242 |
|
| |
|
|
| 16 Sep 2011 12:54 PM |
| After searching about Java and C++ I decided to learn C++ first. |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2011 12:57 PM |
| Since a lot of computers are programmed in C,it'd be more useful to learn that than Java. |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2011 01:12 PM |
Java is used in an enterprise environment. I personally will coin Java here. I know C/C++ and Java. But Java is by far the cleanest language to learn and it's a gateway to C#, as the two languages are very similar.
|
|
|
| Report Abuse |
|
|
|
| 16 Sep 2011 01:17 PM |
Well I got a question.
cout is like print() in Lua right? So it's a function? |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2011 01:18 PM |
| Also after the << are the variables right? |
|
|
| Report Abuse |
|
|
| |
|
|
| 16 Sep 2011 01:22 PM |
Oh okay, an one more question, using this:
cout << "Hai" << "Nou";
Is like using this in Lua?
print("Hai", "Nou")
I do know it joins them together by the way. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
geicogeko
|
  |
| Joined: 27 Apr 2010 |
| Total Posts: 2727 |
|
| |
|
XlegoX
|
  |
| Joined: 16 Jun 2008 |
| Total Posts: 14955 |
|
|
| 16 Sep 2011 04:38 PM |
Here's how cout works for anyone interested:
"cout" is an oject, and "ostream" to be exact, which you can think of as "something you can write output to"
There's also an operator "<<" which written in pseudo-code which looks like this: function`<<`(ostream, object) ostream.wrtite(tostring(object)) return ostream end
The most important part to note is the "return ostream", the << operator used on cout returns cout itself, which means that the returned cout can be called on again by other << operator. EG:
cout << "Hello" << name << "\n"; showing operator precedence explicitly: (((cout << "Hello") << name) << "\n") replacing the infix operators with a function calls, I'll all the function "c" for clarity: c( c( c(cout, "Hello"), name ), "\n")
From that last line an your familiarity with Lua it should make sense how it works. c both prints the value, and returns the thing it printed the value to, so that the next operator can be called on that target for the output. |
|
|
| Report Abuse |
|
|
hyper900
|
  |
| Joined: 14 May 2009 |
| Total Posts: 873 |
|
|
| 16 Sep 2011 04:45 PM |
| If you plan on going for a webdesign career, JavaScript, PHP, HTML, XHTML, CSS and all that stuff is the way to go. If you want games and stuff, C is a good place to start. |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2011 04:50 PM |
Java's print method is much nice:
System.out.println("This is output"); |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2011 04:51 PM |
My friend who is a game developer said to learn C++ first then C.
[I hate floodcheck, wait no, floodcheck hates me!] |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2011 04:54 PM |
| I actually prefer Java over C++. |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2011 05:01 PM |
| Learn Java first. It will mean you won't hit walls over and over when you're learning how to interface with graphics and stuff as much in C++ (which is much more straightforward in Java). |
|
|
| Report Abuse |
|
|
LocalChum
|
  |
| Joined: 04 Mar 2011 |
| Total Posts: 6906 |
|
|
| 16 Sep 2011 05:07 PM |
C++
Y U EVEN CONSIDER USING JAVA?! |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2011 05:10 PM |
[probably bad poetry]
C++ is more straightforward, it's just really low-level; I like Java, as it is not, in the GUI department, dishevel; It has nice GUI programming (with window-widgets) built into its standard library; Whereas C++ interfaces with the operating system more directly; But there is not really a choice that can be picked more correctly.
[/probably bad poetry]
Java also has comprehensive Unicode support which is really nice.. |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2011 05:35 PM |
@Local Blame Notch
[I hate floodcheck, wait no, floodcheck hates me!] |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2011 06:09 PM |
| I pick... Hmmm... Well, I would pick Java, because its alot simpler than C++. And if you want simpler than tat... Learn to HTML/XML. 0_0 |
|
|
| Report Abuse |
|
|