Sign in to follow this  

i dont get this

This topic is 4396 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

ok i just started today and iv been trying to fix this for about 15 minutes and i dont understand wut i did wrong. im using C++ #include <iostream> #include <stdio.h> int main(int argc, char *argv[]) { cout << "C++ is Fun!!!"; getchar(); return 0; } its saying 'cout' undeclared (first use this function)

Share this post


Link to post
Share on other sites
you're missing
using namespace std;
after the includes. Or you can prefix cout with std::

[Edit]You should use the c++ header file cstdio instead of stdio.h, although I'm not sure how much it matters.

Share this post


Link to post
Share on other sites
What are you using for tutorials and/or a book? Anything written before 1998 isn't recommended, because it's not going to be compliant with the STL and it won't tell you anything about namespaces (which is what the problem you were having is about).

Share this post


Link to post
Share on other sites

This topic is 4396 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this