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