| www.delorie.com/archives/browse.cgi | search |
| From: | Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: EXE file size |
| Date: | Thu, 05 Oct 2000 22:12:05 +0100 |
| Organization: | Customer of Energis Squared |
| Lines: | 23 |
| Message-ID: | <ljrptsosilu58u0kbvkimgs3mf4fqc7dc9@4ax.com> |
| References: | <8rg4fg$sm6$1 AT nntp DOT itservices DOT ubc DOT ca> <bpcntsclvenao7tnpiqeu887qek2aa07pp AT 4ax DOT com> <39DBE197 DOT 646673D4 AT home DOT com> |
| NNTP-Posting-Host: | modem-81.aredhel.dialup.pol.co.uk |
| Mime-Version: | 1.0 |
| X-Trace: | newsg4.svr.pol.co.uk 970780412 3917 62.136.123.81 (5 Oct 2000 21:13:32 GMT) |
| NNTP-Posting-Date: | 5 Oct 2000 21:13:32 GMT |
| X-Complaints-To: | abuse AT theplanet DOT net |
| X-Newsreader: | Forte Agent 1.7/32.534 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Tom Fjellstrom <tfjellstrom AT home DOT com> wrote:
> > printf("hello world!"); and change <iostream> to <cstdio>.
> ^^^^^^^^
> Does that actually work?
Yes.
> when using gcc I think: <stdio.h>
> is what you're supposed to use.
Using gcc or gpp does not determine whether the code is C or C++. It
is the file extension (.c, .C, .cc or .cpp) that determines this.
Since the original poster was asking how to use C stanard I/O,
printf(), in a C++ program, test.cpp, I suggested the header file
<cstdio>.
Of course, <stdio.h> is also valid.
If you don't want to take advantage of *any* C++ features then the
code could also be written as C only (test.c), in which case the
header to include would be <stdio.h>.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |