AIX version 4.3.3
g++ version 2.95.3.0
when I try to compile my program it gives me an error Collect2: Library libm not found. I can not find a library libm on bulls freeware where I had gotten g++ from.
here is my code, any help would be appreciated.
the command I used to compile was "g++ parsing.cpp".
When compiled with MS Visual C++ as a consol application works perfectly
THIS PROGRAM IS USELESS THE WAY IT IS BUT i AM TESTING THE FUNCTIONALITY FOR ANOTHER PERPOSE.
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
string field[23];
string line;
int Pipe;
int counter;
ifstream inputfile;
ofstream outputfile;
inputfile.open ("filename"
outputfile.open ("output.txt"
if ( !inputfile )
{
cout << "FILE NOT OPENED";
return 1;
}
while (true)
{
getline(inputfile, line); // priming read for EOF
if(inputfile.eof()) // break on EOF
break;
for(counter = 0; counter < 23; counter++)
{
Pipe = line.find("|"
field[counter] = line.substr(0, Pipe);
line = line.substr(Pipe + 1);
outputfile << field[counter] << "|";
}
outputfile << endl;
}
return 0;
}
g++ version 2.95.3.0
when I try to compile my program it gives me an error Collect2: Library libm not found. I can not find a library libm on bulls freeware where I had gotten g++ from.
here is my code, any help would be appreciated.
the command I used to compile was "g++ parsing.cpp".
When compiled with MS Visual C++ as a consol application works perfectly
THIS PROGRAM IS USELESS THE WAY IT IS BUT i AM TESTING THE FUNCTIONALITY FOR ANOTHER PERPOSE.
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
string field[23];
string line;
int Pipe;
int counter;
ifstream inputfile;
ofstream outputfile;
inputfile.open ("filename"
outputfile.open ("output.txt"
if ( !inputfile )
{
cout << "FILE NOT OPENED";
return 1;
}
while (true)
{
getline(inputfile, line); // priming read for EOF
if(inputfile.eof()) // break on EOF
break;
for(counter = 0; counter < 23; counter++)
{
Pipe = line.find("|"
field[counter] = line.substr(0, Pipe);
line = line.substr(Pipe + 1);
outputfile << field[counter] << "|";
}
outputfile << endl;
}
return 0;
}