|
 |
|
 |
04-21-2003, 01:51 PM
|
#1 (permalink)
|
|
Registered User
Join Date: Mar 2003
Location: Pittsburgh
Posts: 45
|
Just a simple Question
Are there any programs that do not use <iostream.h>??
Im just wondering, because I am. 
|
|
|
04-21-2003, 02:08 PM
|
#2 (permalink)
|
|
bloomberg
Join Date: Jun 2002
Location: bloomberg
Posts: 263
|
of course.
__________________
-- bloomberg.
|
|
|
04-21-2003, 02:10 PM
|
#3 (permalink)
|
|
Registered User
Join Date: Mar 2003
Location: Pittsburgh
Posts: 45
|
Quote:
Originally posted by abc123
of course.
|
Like what? Is there a 2 line example program I could see?
|
|
|
04-21-2003, 02:14 PM
|
#4 (permalink)
|
|
bloomberg
Join Date: Jun 2002
Location: bloomberg
Posts: 263
|
id suggest that most windows based programs ( winapi ) wouldn't require it.
__________________
-- bloomberg.
|
|
|
04-21-2003, 03:55 PM
|
#5 (permalink)
|
|
LOAD "*",8,1
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
|
Quote:
Originally posted by Zenogear11
Like what? Is there a 2 line example program I could see?
|
here's one for you:
Code:
int main(int argc, char *argv[])
{
return 0;
}
iostream.h is a c++ thing. no c programs (ex: linux kernel, gcc, sshd, apache, emacs, ...) use iostream. nor do most windows apps (that don't use a text interface).
|
|
|
04-21-2003, 06:31 PM
|
#6 (permalink)
|
|
Regular Contributor
Join Date: Feb 2003
Posts: 120
|
you can write a console program that doesn't need to output or input anything, so iostream would not be needed.
|
|
|
04-21-2003, 07:51 PM
|
#7 (permalink)
|
|
LOAD "*",8,1
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
|
a console program that doesn't do any io is not much of a console program, i would say.
Code:
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("hello world\n");
return 0;
}
|
|
|
04-22-2003, 05:00 AM
|
#8 (permalink)
|
|
Regular Contributor
Join Date: Feb 2003
Posts: 120
|
Quote:
Originally posted by joe_bruin
a console program that doesn't do any io is not much of a console program, i would say.
|
well, you could just write a program that takes input from a file, and output to another file, no need for cin and cout, just ifstream and ofstream stuff.
|
|
|
04-22-2003, 01:28 PM
|
#9 (permalink)
|
|
LOAD "*",8,1
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
|
Quote:
Originally posted by alpha
well, you could just write a program that takes input from a file, and output to another file, no need for cin and cout, just ifstream and ofstream stuff.
|
that's not a console program, in that it makes no use of the console. a console program would fail (or be totally useless) if you closed stdin, stdout, and stderr before exec'ing it, whereas a program that only does file io would not.
|
|
|
04-22-2003, 02:49 PM
|
#10 (permalink)
|
|
Registered User
Join Date: Mar 2003
Location: Pittsburgh
Posts: 45
|
Well, Im glad my question has posed some controversy between programmers
Thanks for anwsering!
|
|
|
04-22-2003, 04:50 PM
|
#11 (permalink)
|
|
bloomberg
Join Date: Jun 2002
Location: bloomberg
Posts: 263
|
Quote:
Originally posted by joe_bruin
that's not a console program, in that it makes no use of the console. a console program would fail (or be totally useless) if you closed stdin, stdout, and stderr before exec'ing it, whereas a program that only does file io would not.
|
its not like "iostream.h" is the only way to get input / output from your console app.
__________________
-- bloomberg.
|
|
|
04-22-2003, 07:52 PM
|
#12 (permalink)
|
|
Registered User
Join Date: Apr 2003
Posts: 34
|
Well, you could always use the c libraries (printf, etc.) for your i/o for a console app.
|
|
|
04-30-2003, 01:33 PM
|
#13 (permalink)
|
|
Registered User
Join Date: Apr 2003
Location: San Jose - SF Bay Area
Posts: 2
|
errr!
Disregard that last post -- wrong post.
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -8. The time now is 12:05 AM.
|
Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
|
 |
|