LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   help!! (https://www.linuxquestions.org/questions/linux-newbie-8/help-4175471179/)

anbarasi 07-28-2013 01:26 AM

help!!
 
i am using fedora...i hv installed gcc!
wen i compile i get error std::cin and cout not found!
this command i hv used !yum install gcc-c++

is there any other thing i need to install??

moo-cow 07-28-2013 01:39 AM

Please post your source code and the command that you're using to compile it!

anbarasi 07-28-2013 02:19 AM

#include<iostream>
using namespace std;
int main()
{
cout<<"hello\n";
return 0;
}
after compling i get error
in fn maiin: undefined reference to 'std::cout'
undefined reference to 'std::basic ostream

cristi92b 07-28-2013 02:35 AM

Did you compiled it with a command like:
Code:

g++ main.cpp -o main.exe
?


All times are GMT -5. The time now is 07:39 PM.