LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-10-2004, 10:25 AM   #1
Thaith
Member
 
Registered: Oct 2003
Posts: 32

Rep: Reputation: 15
Std C++


Hello everyone. I have a assignment need to be done with using STDC++ library in linux.
I don't know what is STDC++ . And I don't know where to start ? Is if different from C++ ?

Can you tell me sth about StdC++ library , and please demo a simple Program using StdC++ to me.!!!!

Many thanks
 
Old 05-10-2004, 11:25 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
libstdc++ is the basic gcc C++ library set (like the C++ equivlent to glibc).

The documentation can be found here:
http://gcc.gnu.org/onlinedocs/libstd...mentation.html
 
Old 05-10-2004, 02:30 PM   #3
calble
LQ Newbie
 
Registered: Aug 2003
Location: Louisville, KY or Evansville, IN
Distribution: Fedora Core 3
Posts: 29

Rep: Reputation: 15
STD C++ is just C++ using standard libraries. If the header file is in your include directory such as /usr/include/c++/3.3.1 this it is part of srd C++. Example header files would be:
ctime.h
iostream
iofstream
cstdlib

Basically if this is for school, the teacher/professor doesn't want to to get on the internet and download a library that does everything for you. Sort of like in math class when you aren't allow to use a calculator.

Here is an example program:

#include <iostream>

using namespace std;

int main()
{
cout << "hello world!" << endl;
return true;
}
 
Old 05-11-2004, 04:01 AM   #4
Thaith
Member
 
Registered: Oct 2003
Posts: 32

Original Poster
Rep: Reputation: 15
I have a problem as following :

Write a program in Linux , using StdC++ library to add ,subtract , multiply , divide two polynomials . The polynomials must be implemented using Pointer or sth like that.

I have no Idea about what to do , could you help me , give me some code
 
Old 05-11-2004, 04:06 AM   #5
Thaith
Member
 
Registered: Oct 2003
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by calble
STD C++ is just C++ using standard libraries. If the header file is in your include directory such as /usr/include/c++/3.3.1 this it is part of srd C++. Example header files would be:
ctime.h
iostream
iofstream
cstdlib

}
are all the header file in /usr/include/3.3.1 part of STD C++ ?
 
Old 05-11-2004, 07:59 AM   #6
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
No. Only the libraries discussed in the documentation I linked to above are apart of the libstdc++ library.

I think these are all the standard C++ libraries
<algorithm>
<bitset>
<deque>
<exception>
<fstream>
<functional>
<iomanip>
<ios>
<iosfwd>
<iostream>
<istream>
<iterator>
<limits>
<list>
<locale>
<map>
<memory>
<new>
<numeric>
<ostream>
<queue>
<set>
<sstream>
<stack>
<stdexcept>
<streambuf>
<string>
<typeinfo>
<utility>
<valarray>
<vector>

These are all the C libraries also included in libstdc++ (notice how they look like the c libraries but have an add c at the front).

<cassert>
<cctype>
<cerrno>
<cfloat>
<ciso646>
<climits>
<clocale>
<cmath>
<csetjmp>
<csignal>
<cstdarg>
<cstddef>
<cstdio>
<cstdlib>
<cstring>
<ctime>
<cwchar>
<cwtype>

This, in reality, is a lot of libraries and a lot of functionality you just don't need for your assignment. What you will need looks like <iostream> (input/output of your data) and that is about it. The math you need is simple so there is no need to use the cmath library. Given this is a school assignment, I doubt you are going to get anyone to actually write any code for you. If you are still completely lost I recommend consulting the class textbook or perhaps your teacher.

Also note.. if you are used to C programming, that there are no .h's. The use of .h in an include is depreciated in newer versions of G++.

Last edited by jtshaw; 05-11-2004 at 08:04 AM.
 
Old 05-11-2004, 09:17 PM   #7
Thaith
Member
 
Registered: Oct 2003
Posts: 32

Original Poster
Rep: Reputation: 15
Please demo juct add funtion to me . The time is coming up.
 
Old 08-28-2005, 05:45 AM   #8
TheGiantPotato
Member
 
Registered: Dec 2003
Location: Kansai, Japan
Distribution: LFS, FedoraCore
Posts: 35

Rep: Reputation: 15
Hmm... so you're saying you want us to do your homework assignment for you?

That's a big no.

You won't learn much that way.

My advice, read a C++ tutorial, (like on cplusplus.com, for example... here, I'll make it easy for you, since you're obviously into doing things the easy way and having others do your work for you... click here, you lazy weasel)

Next, go to some place like The Wikipedia and look up with a polynomial is... I don't expect you to know what one is as others have obviously done all of your work for you your entire academic life.

That's it. No more freebies. You should get your ass kicked for publicly trawling for free homework answers... I don't like physically weak people, and I have no respect for the mentally weak, either... most decent programmers don't have time for it, either, as they have all put in time learning everything for themselves, whether in class or on their own.

Its not that hard.

Last edited by TheGiantPotato; 08-28-2005 at 05:46 AM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what does the std:: do? RHLinuxGUY Programming 1 11-15-2005 01:01 PM
P.H.L.A.K. or Knoppix STD fatrandy13 Linux - General 3 10-21-2004 10:28 AM
Knoppix Std OMEGA-DOOM Linux - Distributions 2 06-28-2004 02:37 PM
knoppix std!! viral Linux - Software 1 11-30-2003 06:49 PM
knoppix-std? chiatello Linux - Security 1 07-14-2003 04:59 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration