Jump to content
  • Advertisement
Sign in to follow this  
maggot789

i dont get this

This topic is 4613 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!