Thread: [Dev-C++] very strange error & print to printer
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Eric <eri...@cl...> - 2004-07-31 11:44:36
|
Hi all
I just thought I should stop loosing it an get a C++ project going,
So just to road test the program I clicked on the project tab "Console
application"
on the "additional tab clicked "Hello world"
Then I clicked "OK" and up came.
#include <windows.h>
#include <iosteam.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
cout << "Hello World!" << endl;
cout << "Press ENTER to continue..." << endl;
getchar ();
return 0;
}
++++++++++++++++++++++++++++
Notice the second line that should be #include <iostream.h>
OK
is there a way in your C++ project to send data (like print a invoice)
off to a printer, I looked under "print" in the help files and it was no
help.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.732 / Virus Database: 486 - Release Date: 29-Jul-04
|
|
From: Todd G. <pi...@ea...> - 2004-07-31 13:25:52
|
> -----Original Message----- > From: dev...@li... < snip > > Notice the second line that should be #include <iostream.h> < snip > See the book Thinking in C++, 2nd ed. Volume 1 ©2000 by Bruce Eckel This is a FREE download from http://www.mindview.net/. Do not get volume 2 of this book. It is way too complicated for beginning. ----------------------------------------------------------------------- Standard C++ include format As C++ evolved, different compiler vendors chose different extensions for file names. In addition, various operating systems have different restrictions on file names, in particular on name length. These issues caused source code portability problems. To smooth over these rough edges, the standard uses a format that allows file names longer than the notorious eight characters and eliminates the extension. For example, instead of the old style of including iostream.h, which looks like this: #include <iostream.h> you can now write: #include <iostream> The translator can implement the include statements in a way that suits the needs of that particular compiler and operating system, if necessary truncating the name and adding an extension. Of course, you can also copy the headers given you by your compiler vendor to ones without extensions if you want to use this style before a vendor has provided support for it. The libraries that have been inherited from C are still available with the traditional .h extension. However, you can also use them with the more modern C++ include style by prepending a c before the name. Thus: #include <stdio.h> #include <stdlib.h> become: #include <cstdio> #include <cstdlib> And so on, for all the Standard C headers. This provides a nice distinction to the reader indicating when youre using C versus C++ libraries. The effect of the new include format is not identical to the old: using the .h gives you the older, non-template version, and omitting the .h gives you the new templatized version. Youll usually have problems if you try to intermix the two forms in a single program. |
|
From: Eric <eri...@cl...> - 2004-07-31 21:40:12
|
THANK YOU I have already seen the book, and done the course, I don't need to learn the correct way, I was just pointing out the error so a correction could be made to th= e DEV template, so other newbie C++ students don't get stress out by a error within the DEV program. by the mispelt word. THANK YOU ----- Original Message ----- =46rom: "Todd Gardner" <pi...@ea...> To: "Eric" <eri...@cl...>; <dev...@li...> Sent: Sunday, August 01, 2004 1:27 AM Subject: RE: [Dev-C++] very strange error & print to printer > -----Original Message----- > From: dev...@li... < snip > > Notice the second line that should be #include <iostream.h> < snip > See the book Thinking in C++, 2nd ed. Volume 1 =A92000 by Bruce Eckel This is a FREE download from http://www.mindview.net/. Do not get volume 2 of this book. It is way too complicated for beginning. ---------------------------------------------------------------------= -- Standard C++ include format As C++ evolved, different compiler vendors chose different extensions for file names. In addition, various operating systems have different restrictions on file names, in particular on name length. These issue= s caused source code portability problems. To smooth over these rough edges, the standard uses a format that allows file names longer than the notorious eight characters and eliminates the extension. For example, instead o= f the old style of including iostream.h, which looks like this: #include <iostream.h> you can now write: #include <iostream> The translator can implement the include statements in a way that sui= ts the needs of that particular compiler and operating system, if necessary truncating the name and adding an extension. Of course, you can also copy the headers given you by your compiler vendor to ones without extensi= ons if you want to use this style before a vendor has provided support for i= t. The libraries that have been inherited from C are still available wit= h the traditional '.h' extension. However, you can also use them with the m= ore modern C++ include style by prepending a "c" before the name. Thus: #include <stdio.h> #include <stdlib.h> become: #include <cstdio> #include <cstdlib> And so on, for all the Standard C headers. This provides a nice distinction to the reader indicating when you're using C versus C++ libraries. The effect of the new include format is not identical to the old: usi= ng the =2Eh gives you the older, non-template version, and omitting the .h g= ives you the new templatized version. You'll usually have problems if you try = to intermix the two forms in a single program. ------------------------------------------------------- This SF.Net email is sponsored by OSTG. Have you noticed the changes = on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now= , one more big change to announce. We are now OSTG- Open Source Technol= ogy Group. Come see the changes on the new OSTG site. www.ostg.com _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.732 / Virus Database: 486 - Release Date: 29-Jul-04 |
|
From: Michal M. <mi...@mo...> - 2004-08-01 00:44:35
|
Eric wrote:
> I was just pointing out the error so a correction could be made to the
> DEV template, so other newbie C++ students don't get stress out by a
> error within the DEV program. by the mispelt word.
That's fine but this problem is fixed for years, you have to been using
some extremely ancient version (probably 4.0).
Regards,
Michal
|