LinuxAnswers - the LQ Linux tutorial section.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


Closed Thread
  Search this Thread
Old 03-03-2004, 01:50 PM   #1
LQ Newbie
Registered: Mar 2004
Posts: 3

Rep: Reputation: 0
Using g++ to compile multiple source files

I have a total of 5 files:

1. test.cpp

int main()
ifstream examplefile("readme.txt");
TextTranslator tt(examplefile);

2. TextTranslator.cpp
TextTranslator :: TextTranslator(){
TextTranslator :: TextTranslator(ifstream examplefile){

if (! examplefile.is_open())
cout << "Error opening file";
exit (1);
void TextTranslator :: translation(ifstream examplefile)
ofstream outfile("readme.xml");
outfile << "<Document>\n";
outfile << examplefile.rdbuf();
outfile << "\n</Document>";

3. TextTranslator.h
class TextTranslator: public Translator {
Old 03-03-2004, 03:21 PM   #2
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,191
Blog Entries: 4

Rep: Reputation: 464Reputation: 464Reputation: 464Reputation: 464Reputation: 464
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

And trying to post 3 times in the wrong forum is clearly against the rules. Please do not do it again.

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
unable to compile source files Hallowedpoint Linux - Newbie 6 11-19-2005 09:02 AM
multiple C source files howto introuble Programming 2 07-31-2005 08:49 PM
Where must I download files to so I can compile and install from source? eBopBob Linux - Software 3 08-12-2004 03:52 PM
Using g++ to compile multiple source files arnab_be Linux - Newbie 1 03-03-2004 03:22 PM
I need help using multiple source files CodeWarrior Programming 4 12-30-2003 05:18 AM

All times are GMT -5. The time now is 05:44 PM.

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