Question:
is c++ / win32 the exact same functionality as PHP/HTML?
1Man1God
2010-06-21 11:37:43 UTC
im looking at API and it looks like another whole programming language, is the relationship of C++/API the same as PHP/HTML? meaning can i create a variable/s with the users input then work with it behind the lines. or is API kinda like its own language just using templates and classes from C++.
Five answers:
anonymous
2010-06-23 20:27:07 UTC
A good example of a collection of API's is DirectX. You have Direct3D, DirectSound, DirectInput, D3DXSprite, etc... All of which are different application programming interfaces (API's) that make up the DirectX SDK (software developement kit).



The DirectX API's are meant specifically for, well pretty much what their names imply. Direct3D allows a programmer to use a list of predefined functions and classes that are used to draw 3D images to the screen. DirectInput allows the programmer to use functions that check for and handle input from different input devices.



However, as many previous answers stated, C++ is not the only language that can access these API's.



If you were using PHP, you would think of an API as being sort of like a premade file of classes and functions that you include in your PHP scripts to more easily work with other interfaces such as the video or sound card hardware (dumbed down version).



If you know ANYTHING at all about HTML, then you already know that HTML has absolutely nothing to do with programming. All HTML does for PHP is allow the data returned from the server to be interpreted and displayed by the user's web browser (we could get into .hta files, but that's further than I want to take this). HTML is merely the logical form of the visual structure of a webpage and is merely a mark-up language.
Kenneth
2010-06-21 11:49:01 UTC
These are two completely separate things. PHP/HTML is used to do web pages. HTML handles the layout stuff, PHP is a scripting language that makes your page do stuff. PHP is a server side language which means it runs on the web server that is displaying your web page.



C++ and the Win32 API - C++ is a programming language. Yes, it does have things like variables and it can also be used to write a program that gathers stuff, but it is most often used to write a program that runs on a standalone machine. You can use C++ to develop software for Windows and the Win32 API simply provides a number of methods to allow a program to make use of some of the built in operating system functionality. The Win32 API is not always needed to write a program if you don't need the added functionality.
anonymous
2010-06-21 12:44:34 UTC
An API is a programming interface - you can call it from almost any language. For instance, you can call a keyboard API to see if a key has been pressed. It doesn't require C++ (or any variant of C) and it doesn't require classes. (We used APIs in ISIS, long before anyone ever thought of C or classes [or even DOS]. We just didn't call them APIs yet.)



All languages let you input user input, then work with that input "behind the lines" with variables.



HTML is just content. It's what's *on* the page. It's the "user interface" in C++ terms.
anonymous
2010-06-21 15:21:39 UTC
API is not specifically geared towards C programming. For example, JavaScript uses a sort of API (like Colanth exampled) when it asks for a keypress.

<... onKeyPress="action"> or even a mouse click.



C and PHP are similar in the underlying ACTION -- However it is a totally different language you have to learn.



cprogramming.com helped me out alot with the C++ interface



Good Luck!

If you need further assistance/advice, feel free to contact me.
Pfo
2010-06-21 12:45:13 UTC
They are entirely different.



All programming langauges that I know of (around 30 or so) let you create named variables, do conditional tests and do for / while / do while loops. These are standard program constructs.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...