Hello,
Thanks for the information.
I could use this and get my programs going.
Regards,
Ankur
On 09/27/2012 11:13 PM, Johannes Schmid
wrote:
Hi!
gets and cout are declared in the std namespace so either use
std::cout or using namespace std.
Johannes
"Ravindra B. Bodhe" <rbodhe airtelmail in> schrieb:
Hello,
I am student and want to use Anjuta for C++ assignments.
However, even for simple code (which appears to be correct) the
system throws errors.
I am unable to find the reason.
If you can help me and tell the cause and solution it will help
me. Also, if you could point to a useful tutorial on 'C++
program construction in Anjuta', it will help.
Appreciate your response.
Thank you,
Regards,
Ankur
#include <iostream>
#include <string>
using namespace std;
int main()
{
char pstr [50];
cout << "Hello World";
gets (pstr);
strcat (pstr, "Cricket");
cout << pstr;
return 0;
}
Compilation error message:
main.cc:32:13: error: ‘gets’ was not declared
in this scope
main.cc:33:25: error: ‘strcat’ was not
declared in this scope
This code was was modification to the standard C++ template
created by Anjuta on Suse 12.2.
|