473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

HELP!! (kind of repetitive, yes.)

hello.
i tried this for a simple push_back action..... it says "ostream - no
such file or directory"

#include <iostream>
#include <conio2.h>
#include <string>
#include <ostream>
int main()
{
clrscr();
std::cout<<"rough engine of ecod\n\n";
std::cout<<"please input text\n\n";
std::cout<<"when you have completely typed in the message, please
press enter\n\n";
std::string str;
getline(std::cin,str,'\n');
str.push_back('\n');
std::cout<<str;
}

compiler error: ostream: no such file or directory
what am i supposed to do?

Dec 9 '06 #1
4 1752
On 2006-12-09 13:39, MC felon wrote:
hello.
i tried this for a simple push_back action..... it says "ostream - no
such file or directory"

#include <iostream>
#include <conio2.h>
#include <string>
#include <ostream>
int main()
{
clrscr();
std::cout<<"rough engine of ecod\n\n";
std::cout<<"please input text\n\n";
std::cout<<"when you have completely typed in the message, please
press enter\n\n";
std::string str;
getline(std::cin,str,'\n');
str.push_back('\n');
std::cout<<str;
}
Removing the #include <conio2.h>, clrscr(), and fixing the linebreak
this compiles perfectly fine for me. If this is really the code that
fails you have a problem with your environment and will have to look for
support somewhere else.

--
Erik Wikström
Dec 9 '06 #2
MC felon wrote:
hello.
i tried this for a simple push_back action..... it says "ostream - no
such file or directory"

#include <iostream>
#include <conio2.h>
#include <string>
#include <ostream>
int main()
{
clrscr();
std::cout<<"rough engine of ecod\n\n";
std::cout<<"please input text\n\n";
std::cout<<"when you have completely typed in the message, please
press enter\n\n";
std::string str;
getline(std::cin,str,'\n');
str.push_back('\n');
std::cout<<str;
}

compiler error: ostream: no such file or directory
what am i supposed to do?
I cannot reproduce that error from your code. It would appear that your
compiler is not set up correctly and does not find some of the standard
headers. You should post your problem in a forum where the quirks of your
particular compiler are topical.
Best

Kai-Uwe Bux
Dec 9 '06 #3
"MC felon" <pa******@gmail.comwrote in message
news:11**********************@79g2000cws.googlegro ups.com

Not just repetitive, dumb too. Try giving your posts subjects that actually
convey useful information.
hello.
i tried this for a simple push_back action..... it says "ostream - no
such file or directory"

#include <iostream>
#include <conio2.h>
#include <string>
#include <ostream>
Let's see now. What are the possibilities?

Either the ostream header exists on your system or it doesn't.

If it does exist, then presumably there is some problem with the way you
have set up directories in your IDE so the file isn't being found. If it
doesn't exist, then either there is a problem with your installation or you
have a non-standard implementation. Either reinstall or get a different
implementation, as appropriate.

Just by the way, you rarely need to #include <ostreamdirectly. Just
#including <iostreamnormally suffices. You might try simply removing
#include <ostream>
int main()
{
clrscr();
std::cout<<"rough engine of ecod\n\n";
std::cout<<"please input text\n\n";
std::cout<<"when you have completely typed in the message, please
press enter\n\n";
std::string str;
getline(std::cin,str,'\n');
str.push_back('\n');
std::cout<<str;
}

compiler error: ostream: no such file or directory
what am i supposed to do?

--
John Carson
Dec 9 '06 #4

Not just repetitive, dumb too. Try giving your posts subjects that actually
convey useful information.
i'll try. only that i'm such a newbee that i'm still struggling to make
the major shift from turbo c++ to a STANDARD compiler.
thanks anyway, i'm switching to CODE::BLOCKS RC1

Dec 10 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dave Smithz | last post by:
Hi there. Because of the lack of a Union query in MySQL 3 I have decided to take the approach where I populate two arrays with values from similar tables in DB. In this case they are `courses`...
2
by: kane_bond | last post by:
Hi, Im not all that great with PHP, but this should be a simple one I want to inster a URL paramater into the default value of a field of a form eg. /test.php?MYVALUE=hello
0
by: Dave | last post by:
Hi I am creating some queries in Access 97 and having difficulty getting them to produce an average figure. I am sure this is easy but can't seem to work it out. An example of this is as...
0
by: Microsoft CSharp | last post by:
How can I intercept the messages coming from HTML Help (kind of hook...)? Thanks. PL
0
by: Constantinos | last post by:
Hi, I have a simple dts job on sql2000. I can execute the dts job through asp.net fine using the following. Dim newpackage As dts.Package newpackage = New dts.Package()...
2
by: Andrew Cranwell | last post by:
Hi, Please redirect me if I am in the wrong group for this question... this is my first post to this group, so I hope it is clear! I am working on an automation project in VB.NET and have to...
1
by: S. van Beek | last post by:
Dear reader, In the form property "Help File" there is the possibility to specify a .chm help file. This help file can be created with "HTML Help Workshop". According the instructions...
1
by: Tarun Mistry | last post by:
Hi all, I am adding dynamic user controls with the simple code as follows: MyPlaceHolder.Controls.Add(LoadControl("MyUserControl.ascx")); I then want to run a member on my user control,...
2
by: webandwe | last post by:
Hi I converted a postgres dump with a program to a mysql dump. I cannot get it loaded in mysql, i get some kind of error. I also tried to install it trough a php page, It says it installed...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.