Sponsored Content
Full Discussion: Newbie Q
Top Forums Programming Newbie Q Post 17782 by <Therapy> on Wednesday 20th of March 2002 05:45:16 AM
Old 03-20-2002
Error message

I tried to run g++ ut got an error about <iostream.h>

As I understod it is supposed to be located in /usr/include but it is not there. Have i got it wrong?

The error msg I got is:

hello.cpp: In function `int main ()':
hello.cpp:5: no match for `_IO_ostream_withassign & = const char[13]'
/usr/include/g++-3/iostream.h:243: candidates are:
_IO_ostream_withassign &_IO_ostream_withassign:Smilieperator= (ostream &)
/usr/include/g++-3/iostream.h:245:
_IO_ostream_withassign &_IO_ostream_withassign:Smilieperator=
(_IO_ostream_withassign &)


and the source code is:

#include <iostream.h>

main ()
{
cout >>"Hello World\n";

return 0;
}

Last edited by <Therapy>; 03-20-2002 at 08:24 AM..
 

10 More Discussions You Might Find Interesting

1. IP Networking

help<newbie>

hello i would like to get a server so i may post websites on the web do i have to pay a lot of money to use someone else's server or is there a way to turn a computer into a basic server please help i am trying to find the most inexpensive way to get my own domain up on the web if this is... (1 Reply)
Discussion started by: skistar
1 Replies

2. Programming

help<newbie>

i am new to the programing enviroment i know html and some of cgi i would like to know how to creat programs i know nothing!!!!!!!!!!!!! what do i need to get started where can i learn the language what language do i need to learn i tried scheme http://www.htdp.com it did not work out well... (9 Replies)
Discussion started by: skistar
9 Replies

3. UNIX for Dummies Questions & Answers

newbie needs help

hi i need some help on command grep and pipe but the man grep and man pipe doesn't help me much is there any site show more detail help on all the unix command?? (1 Reply)
Discussion started by: goodman
1 Replies

4. UNIX for Dummies Questions & Answers

Newbie

I know I'm jsut a newbie, I'm setting up a 1.3 ghz dell as a server. I have experiance using Windows for a webserver, and I was jsut woundering if I would have great difficulty using Unix. is there there like netscape for internet? is there like word? can you listen to Mp3s? can someone... (4 Replies)
Discussion started by: Special K
4 Replies

5. UNIX Desktop Questions & Answers

newbie

Hi, I am interested in learning unix and would like some advice on how I would start to learn unix. Therefore, What would be a good (free) unix distribution to install? Would it be better to invest in a packaged Linux distribution (redhat etc) and get the feel for unix this way? Are... (4 Replies)
Discussion started by: wolf2
4 Replies

6. UNIX for Dummies Questions & Answers

Newbie in need of help

Hey all. I am a MS person that is looking to get into real computing for a change. I have seen a few different references to "UNIX Essentials and Core" DVD in different newbie threads and a quick intraweb search on Google only comes up with links to this forum and an Amazon review. Does anyone... (3 Replies)
Discussion started by: cfjohnsn
3 Replies

7. Solaris

Newbie

Hello Guys, I just join the unix world today, I had my first lesson on unix today. So expect so much questions from me the next time I log in. Thanks (3 Replies)
Discussion started by: Micko
3 Replies

8. UNIX for Dummies Questions & Answers

UNIX newbie NEWBIE question!

Hello everyone, Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware. I hope I am not missing anything! :p (4 Replies)
Discussion started by: Hanamachi
4 Replies

9. Shell Programming and Scripting

perl newbie . &&..programming newbie (question 2)

Hello everyone, I am having to do a lot of perl scripting these days and I am learning a lot. I have this problem I want to move files from a folder and all its sub folders to one parent folder, they are all .gz files.. there is folder1\folder2\*.gz and there are about 50 folders... (1 Reply)
Discussion started by: xytiz
1 Replies

10. Shell Programming and Scripting

perl newbie . &&..programming newbie

Hi, I am new to programming and also to perl..But i know 'perl' can come to my rescue, But I am stuck at many places and need help..any small help is much appreciated... below is the description of what i intend to acheive with my script. I have a files named in this format... (13 Replies)
Discussion started by: xytiz
13 Replies
binops(3bobcat) 						 Binary Operators						   binops(3bobcat)

NAME
binops - Template functions for class-type binary operators SYNOPSIS
#include <utility> #include <bobcat/typetrait> #include <bobcat/binops> DESCRIPTION
Classes can overload binary operators. A class named Class may overload these binary operators to suit its own needs, allowing, e.g., two Class type objects to be added after overloading operator+. Operators for the binary operators *, /, %, +, -, <<, >>, &, |, and ^ (in this man-page they are generically indicated as the `@' operator) can be overloaded by defining the operator@ function. If a class supports copy construction and if it offers binary assignment operators (i.e., it offers members of the form operator@=), then the matching binary operators can all be implemented identically. The move-aware Class &operator@(Class &&lhs, Class const &rhs) is easily implemented in terms of operator@= (note that the class itself doesn't have to be `move-aware' to define this function). The move-aware binary operator one requires a one line implementation, and as its implementation never changes it could safely be defined inline: Class operator@(Class &&lhs, Class const &rhs) { return std::move(lhs @= rhs); } The traditional binary operator can be implemented using its standard form: Class operator@(Class const &lhs, Class const &rhs) { Class tmp(lhs); tmp @= rhs; return tmp; } The implementation in bobcat/binops is slightly more complex as it allows from lhs or rhs promotions. As the binary operators can all be implemented alike their definitions are perfectly suited for templates: A class offering a particular operator@= then automatically also offers the matching binary operators after including bobcat/binops. Since the binary function templates are not instantiated until used their definitions can be processed by the compiler even if a class implements only a subset of the avail- able binary assignment operators. NAMESPACE
The binary operator functions templates in bobcat/binops are not implemented in a particular namespace. This allows sources to include bob- cat/binops in multiple namespaces. If bobcat/binops is to be used in multiple namespaces then the include safeguard (using the identifier INCLUDED_BOBCAT_BINOPS_) must be suppressed between inclusions of bobcat/binops in different namespaces. E.g., to make the binary operator function templates available in a source file using the namespace FBB and in a source file using the default namespace the following scheme can be used: #include <utility> // ensure std::move is available #include <bobcat/typetrait> // required by binops namespace MY_NAMESPACE { #include <bobcat/binops> // binary operators available in MY_NAMESPACE } #undef INCLUDED_BOBCAT_BINOPS_ // suppress the include guard #include <bobcat/binops> // read binops again so the binary // operators can be used in the // default namespace as well INHERITS FROM
- OVERLOADED OPERATORS
The function templates in bobcat/binops implement all arithmetic binary operators, both move-aware and the traditional binary operators, expecting constant lvalue references. They can be used if the matching binary assignment operators were implemented in the classes for which the templates must be instantiated. The following operators are available: Move-aware operators, using temporary objects for its left-hand side operands: o Class operator*(Class &&lhs, Class const &rhs): o Class operator/(Class &&lhs, Class const &rhs): o Class operator%(Class &&lhs, Class const &rhs): o Class operator+(Class &&lhs, Class const &rhs): o Class operator-(Class &&lhs, Class const &rhs): o Class operator<<(Class &&lhs, Class const &rhs): o Class operator>>(Class &&lhs, Class const &rhs): o Class operator&(Class &&lhs, Class const &rhs): o Class operator|(Class &&lhs, Class const &rhs): o Class operator^(Class &&lhs, Class const &rhs): `Traditional' operators, using lvalue references to constant objects for its left-hand side operands: o Class operator*(Class const &lhs, Class const &rhs): o Class operator/(Class const &lhs, Class const &rhs): o Class operator%(Class const &lhs, Class const &rhs): o Class operator+(Class const &lhs, Class const &rhs): o Class operator-(Class const &lhs, Class const &rhs): o Class operator<<(Class const &lhs, Class const &rhs): o Class operator>>(Class const &lhs, Class const &rhs): o Class operator&(Class const &lhs, Class const &rhs): o Class operator|(Class const &lhs, Class const &rhs): o Class operator^(Class const &lhs, Class const &rhs): The latter group of operators also support promotions. EXAMPLE
#include <iostream> #include <utility> #include "../../typetrait/typetrait" #include "../binops" class Demo { friend std::ostream &operator<<(std::ostream &out, Demo const &demo); int d_value; public: Demo(int value = 0) : d_value(value) {} Demo(Demo const &other) : d_value(other.d_value) { std::cout << "Demo CC called "; } Demo &operator+=(Demo const &rhs) { d_value += rhs.d_value; return *this; } }; std::ostream &operator<<(std::ostream &out, Demo const &demo) { return out << demo.d_value; } using namespace std; int main() { Demo four(4); Demo five(5); cout << four + five << ' ' << four + 5 << ' ' << 4 + five << ' '; } FILES
bobcat/binops - defines the binary operator function templates SEE ALSO
bobcat(7) BUGS
o The header files utility, defining std::move, and bobcat/typetrait are required by, but are not included by bobcat/binops. This was a design decision, see the NAMESPACE section. DISTRIBUTION FILES
o bobcat_3.01.00-x.dsc: detached signature; o bobcat_3.01.00-x.tar.gz: source archive; o bobcat_3.01.00-x_i386.changes: change log; o libbobcat1_3.01.00-x_*.deb: debian package holding the libraries; o libbobcat1-dev_3.01.00-x_*.deb: debian package holding the libraries, headers and manual pages; o http://sourceforge.net/projects/bobcat: public archive location; BOBCAT
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'. COPYRIGHT
This is free software, distributed under the terms of the GNU General Public License (GPL). AUTHOR
Frank B. Brokken (f.b.brokken@rug.nl). libbobcat1-dev_3.01.00-x.tar.gz 2005-2012 binops(3bobcat)
All times are GMT -4. The time now is 04:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy