| Author |
Message |
yooeinstein
Cat Chaser


Joined: 31 May 2002 Posts: 493
Location: DC Metro Area
|
Posted:
Tue Nov 04, 2003 2:08 am Post subject: Finally, Understanding C++ and Javascript |
|
Seeing is how both of the programs use the same logic this is making for a fast understanding of Javascript for webpages.
But, I can now see how the hole gui is made and functions for buttons to call on a specific function....
I would still like to know why people say Javascript and Java are so much different.
I guess, my next biggest concern is either:
1. how programmers come up with new ideas
or
2. do they just edit other code on the internet to get there desired result.
I can see how programs have gotten better with the fact we can share data faster....
This is the first time I've taken programming since basic was popular.....
Programming is much easier......My College Professor is in the dark ages unfortunately....... Thank god, without tutors and a endless abundance of examples online I would be lost in Intro to C++......
The only grip I have with some books I find on C++ is there is sometimes libraries that someone else builds to purtain to a certain function such as math calculations. The fact that code in books some programmers call on libraries and others use the straight function such as.......
Example
std::cout <<"What is your name? \n");
std:: cin >> name >> endl;
Instead of calling on the library to function they simply insert the code.....
Now, a friend how writes games for a living says that the compiler takes less time.
The only wish I have is that there would be one standard for writting code and comments to a program for programmers to use.
When you can write a program in several different methods that gets shot write out the window.
Its the old saying there's more then one way to skin a cat....
Well, good luck to networkers that have to learn programming....
Remember, no matter how many terms they throw at you just keep it simple(KISS).....
later good night alll......
|
|
|
|
|
|
|
Lycander
Lead Dog


Joined: 24 May 2002 Age: 25 Posts: 12198
Location: The Constitution State
|
Posted:
Tue Nov 04, 2003 6:17 am Post subject: |
|
Difference between Javascript and Java is:
Javascript is just a scripting language, the machine has to interpret it. Java is compiled code, albeit non-native byte code that's interpreted by a virtual machine. But the simple fact that you have to compile Java code sets it apart from Javascript. Furthermore, Java is more low level than Javascript. |
|
|
|
|
|
|
AngelzRealm
Tail-Wagger


Joined: 21 Oct 2002 Posts: 2134
Location: Palm Bay, FL
|
Posted:
Tue Nov 04, 2003 7:34 am Post subject: |
|
easy as learning spanish?
100110001100011001010110101010111001100001110110101
1337 5!!337 |
_________________ Rest In Peace Kimberly Silver '86-'07
I ♥ my I.T. Guy!
Do you?
http://www.lovemyitguy.com
|
|
|
|
|
CMTG
Leg Humper


Joined: 23 Feb 2002 Posts: 4955
Location: On average, Cheltenham.
|
Posted:
Tue Nov 04, 2003 8:48 am Post subject: Re: Finally, Understanding C++ and Javascript |
|
yooeinstein wrote:
The only grip I have with some books I find on C++ is there is sometimes libraries that someone else builds to purtain to a certain function such as math calculations. The fact that code in books some programmers call on libraries and others use the straight function such as.......
Example
std::cout <<"What is your name? \n");
std:: cin >> name >> endl;
Instead of calling on the library to function they simply insert the code.....
I see you haven't learnt about streams or the standard C++ headers yet...
Let me see if I can provide some clarity where I think you have misunderstood.
The example you give isn't calling any functions as such, you are using operators. Just as you can use the addition and subtraction ( "+" & "-" ) operators on integers, you can use insertion and extraction ( ">>" & "<<" ) operators on streams. Cin and cout are predefined streams within the iostream header and are the first operands of the statements you wrote in your example.
To use the stream's functions to a similar effect (instead of using to operators) you could use:
std::cout.put();
and
std::cin.get();
Also, the iostream.h header you include to use these streams are part of the standard C++ library of headers, hence the "std::" namespace qualifier. You can do very little in C++ without these, the math functions are in the math.h header and alot of C I/O functions are in stdio.h, for example. |
_________________ Pie. I wish I could
constrain my hungry greed but...
Sadly, defeated.
Charlene's Law: There's no such thing as can't.
Charlene's Corollary: Unless it's followed by be arsed.
If only 20% of your staff is programmers, and you can save 50% on salary by outsourcing programmers to India, well, how much of a competitive advantage are you really going to get out of that 10% savings?
|
|
|
|
|
West
Butt Sniffer


Joined: 27 Mar 2003 Posts: 1821
Location: Stealthed
|
Posted:
Wed Nov 05, 2003 3:17 am Post subject: |
|
#include <iostream>
using namespace std;
viod main()
{
int x;
cout << "Hello there, enter a number: " << endl;
cin >> x;
}
The main things which tripped me up while learning C++ (I came from a Pascal backround) is that string isn't a standard datatype and you HAVE to be careful with caste (you had to force the Delphi compiler to caste using 'IntToFloat' for example) and the silly mistakes. '=' instead of '==' in IF statements etc.
Good luck! |
_________________
|
|
|
|
|
|
|