Re: Quick question about streams...?



Robby wrote:

Thankyou Carl....!

Okay, I don't mind learning all there is to learn, but wait a minute...
All the commands that I am doing in Charles Petzold's book (for loops, structures, malloc, and Create file.... isn't that all "C" language)

And isn't the API a bunch of C functions?

I was always confused on this.... For once and for all...............Can I confirm something.

Our processor right runs binary code... right....

which in turn they developped assembler on top of binary code right.....

In which then they invented C which runs on assembler right.....

Then they developped DOS on C right...... or wrong?

Whereby they made Windows out of C language right..... coupled with C functions as the API right or wrong... or am I way off?????

And then how does C++ and VC++ tie into all of this????
And I guess mfc is built to run on the API right....
And what about atl... what is that? and .net runs on the API also or on C++?
And what's a Frameworks?

Anyways.... I always wanted to know concretely where all this stuff really comes from???? I hope some can clear this for me...

All educational comments are *very* *very* appreciated!

Thanks!


Robby:

The relationship between these things is indeed quite complicated. But I think part of your confusion is due to the fact that you are learning C and C++ in a very Windows-centric fashion. The definitions of the C and C++ languages are governed by international standards committees, and these definitions have nothing whatever to do with Windows, DOS, NT, VC++, the Win32 API, or any of that stuff.

A simple C program like

#include <stdio.h>

int main()
{
printf("Hello world\n");
return 0;
}

or C++ program like

#include <isotream>

int main()
{
std::cout << "Hello world\n";
return 0;
}

will compile on any C/C++ compiler, and run in a "console window" on any system.

C++ is build on top of C, and most valid C programs (such as the one above) are also valid C++ programs.

VC++ is a compiler that will compile C and C++ programs. It is a compiler that runs on Windows and generates executables that will run on Windows. There are other compilers that you can use on Windows, and others that you can use on other systems. The gcc compiler is available for most platforms.

David Wilkinson
.



Relevant Pages

  • Re: Looking for BASIC compiler
    ... The subject line is "Looking for BASIC compiler" and I ... It won't be as fast as a true compiler but in all other ... about the Windows API then BBC BASIC for Windows may be the ...
    (comp.lang.basic.misc)
  • Re: undefined reference????
    ... > It is actually a program taken from an API documentation of "link ... and downloaded the Windows version. ... "undefined reference" a compiler or a linker error? ...
    (comp.lang.cpp)
  • Re: VB 6 compilation on Linux for execution on Windows and Linux
    ... make the result windows only. ... XBasic does include compiler directives that ... Linux, but if you do something that is Windows API, then you also need to ... do that for the Linux libs otherwise it will not be cross platform. ...
    (comp.lang.basic.visual.misc)
  • Re: Is compiler OS specific or Hardware specific....
    ... > is compiler OS specific or Hardware specific i.e processor specific.?? ... > but since the OS like windows are proprietary and don't reveal any ... Research more on "Win32 API." ... an emulator (called a virtual machine) for that non-existant ...
    (comp.programming)
  • Re: newbe about API
    ... Emne: Re: newbe about API ... > I found all these API-CALL strings are finally compiled to ... more than that...and Windows simply takes this to an extreme that this ... DLL, when a weak point is found (which, with Microsoft, is something ...
    (alt.lang.asm)