Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 04-21-2003, 01:51 PM   #1 (permalink)
Zenogear11
Registered User
 
Zenogear11's Avatar
 
Join Date: Mar 2003
Location: Pittsburgh
Posts: 45
Zenogear11 is on a distinguished road
Send a message via ICQ to Zenogear11 Send a message via AIM to Zenogear11
Question Just a simple Question

Are there any programs that do not use <iostream.h>??
Im just wondering, because I am.
Zenogear11 is offline   Reply With Quote
Old 04-21-2003, 02:08 PM   #2 (permalink)
abc123
bloomberg
 
abc123's Avatar
 
Join Date: Jun 2002
Location: bloomberg
Posts: 263
abc123 is on a distinguished road
Send a message via AIM to abc123 Send a message via Yahoo to abc123
of course.
__________________
-- bloomberg.
abc123 is offline   Reply With Quote
Old 04-21-2003, 02:10 PM   #3 (permalink)
Zenogear11
Registered User
 
Zenogear11's Avatar
 
Join Date: Mar 2003
Location: Pittsburgh
Posts: 45
Zenogear11 is on a distinguished road
Send a message via ICQ to Zenogear11 Send a message via AIM to Zenogear11
Quote:
Originally posted by abc123
of course.
Like what? Is there a 2 line example program I could see?
Zenogear11 is offline   Reply With Quote
Old 04-21-2003, 02:14 PM   #4 (permalink)
abc123
bloomberg
 
abc123's Avatar
 
Join Date: Jun 2002
Location: bloomberg
Posts: 263
abc123 is on a distinguished road
Send a message via AIM to abc123 Send a message via Yahoo to abc123
id suggest that most windows based programs ( winapi ) wouldn't require it.
__________________
-- bloomberg.
abc123 is offline   Reply With Quote
Old 04-21-2003, 03:55 PM   #5 (permalink)
joe_bruin
LOAD "*",8,1
 
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
joe_bruin is on a distinguished road
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).
joe_bruin is offline   Reply With Quote
Old 04-21-2003, 06:31 PM   #6 (permalink)
alpha
Regular Contributor
 
Join Date: Feb 2003
Posts: 120
alpha is on a distinguished road
Send a message via AIM to alpha
you can write a console program that doesn't need to output or input anything, so iostream would not be needed.
alpha is offline   Reply With Quote
Old 04-21-2003, 07:51 PM   #7 (permalink)
joe_bruin
LOAD "*",8,1
 
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
joe_bruin is on a distinguished road
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;
}
joe_bruin is offline   Reply With Quote
Old 04-22-2003, 05:00 AM   #8 (permalink)
alpha
Regular Contributor
 
Join Date: Feb 2003
Posts: 120
alpha is on a distinguished road
Send a message via AIM to alpha
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.
alpha is offline   Reply With Quote
Old 04-22-2003, 01:28 PM   #9 (permalink)
joe_bruin
LOAD "*",8,1
 
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
joe_bruin is on a distinguished road
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.
joe_bruin is offline   Reply With Quote
Old 04-22-2003, 02:49 PM   #10 (permalink)
Zenogear11
Registered User
 
Zenogear11's Avatar
 
Join Date: Mar 2003
Location: Pittsburgh
Posts: 45
Zenogear11 is on a distinguished road
Send a message via ICQ to Zenogear11 Send a message via AIM to Zenogear11
Well, Im glad my question has posed some controversy between programmers
Thanks for anwsering!
Zenogear11 is offline   Reply With Quote
Old 04-22-2003, 04:50 PM   #11 (permalink)
abc123
bloomberg
 
abc123's Avatar
 
Join Date: Jun 2002
Location: bloomberg
Posts: 263
abc123 is on a distinguished road
Send a message via AIM to abc123 Send a message via Yahoo to abc123
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.
abc123 is offline   Reply With Quote
Old 04-22-2003, 07:52 PM   #12 (permalink)
kyoryu
Registered User
 
Join Date: Apr 2003
Posts: 34
kyoryu is on a distinguished road
Well, you could always use the c libraries (printf, etc.) for your i/o for a console app.
kyoryu is offline   Reply With Quote
Old 04-30-2003, 01:33 PM   #13 (permalink)
braingeyser
Registered User
 
braingeyser's Avatar
 
Join Date: Apr 2003
Location: San Jose - SF Bay Area
Posts: 2
braingeyser is on a distinguished road
Angry

errr!

Disregard that last post -- wrong post.
braingeyser is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
c simple question if13121 Standard C, C++ 10 11-01-2004 06:29 AM
c simple question problem with switch case if13121 Standard C, C++ 1 10-24-2004 09:43 PM
simple c question if13121 Standard C, C++ 3 10-18-2004 10:20 PM
another simple question cracksevi Standard C, C++ 4 10-18-2004 12:53 AM
Really simple question... Ilya020 HTML, XML, Javascript, AJAX 12 10-29-2003 02:10 PM


All times are GMT -8. The time now is 12:05 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting