williamburn
April 24th, 2008, 04:07 AM
#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
string yell = "a dragon is coming, take cover!!!";
int main (void)
{
cout<< yell.c_str() <<endl
<< yell.c_str() <<endl
<< yell.c_str() <<endl
<< yell.c_str() <<endl;
return 0;
}
When i perform my gcc ---
$gcc townCrier.cpp -o townCrier
I get a ton of errors. Do you think it is possible that my gcc compiler cannot properly find the libraries? Let me preface my question with these are examples that I am working through c++ for the absolute beginner. I know, but its the only way i have been able to figure out this c++ thing.
I have ensured that my buildessential is up to date as well. Any help would be much appreciated as I really dont want to work in windows to learn programming.
Thanks in advance.
#include <string>
#include <cstdlib>
using namespace std;
string yell = "a dragon is coming, take cover!!!";
int main (void)
{
cout<< yell.c_str() <<endl
<< yell.c_str() <<endl
<< yell.c_str() <<endl
<< yell.c_str() <<endl;
return 0;
}
When i perform my gcc ---
$gcc townCrier.cpp -o townCrier
I get a ton of errors. Do you think it is possible that my gcc compiler cannot properly find the libraries? Let me preface my question with these are examples that I am working through c++ for the absolute beginner. I know, but its the only way i have been able to figure out this c++ thing.
I have ensured that my buildessential is up to date as well. Any help would be much appreciated as I really dont want to work in windows to learn programming.
Thanks in advance.