   newb stuck with classes.
  hi guys i am trying make a new menu. Following advice from others i have been told to split it into separate files. Heres what i have so far//menu.cpp#include "menu.h"void menu::showmenu(){std::cout << "Hello ";}//menu.h#ifndef MENU_H_#defineMENU_H_class menu{public:void showmenu();};#endif//main.cpp#include <iostream>#include "menu.h"int main(){using std::cout;using std::cin;menu main;main.showmenu();cin.get();cin.get();return 0;}I get 1>c:\documents and settings\elliot\my documents\visual studio 2008\projects\game26609\game26609\menu.cpp(6) : error C2653: 'std' : is not a class or namespace name1>c:\documents and settings\elliot\my documents\visual studio 2008\projects\game26609\game26609\menu.cpp(6) : error C2065: 'cout' : undeclared identifier1>Build log was saved at "file://c:\Documents and Settings\elliot\My Documents\Visual Studio 2008\Projects\Game26609\Game26609\Debug\BuildLog.htm"1>Game26609 - 2 error(s), 0 warning(s)when i compile it. Please can u help me and tell me where i am going wrong?   
  You need #include <iostream> inside the menu.h as well   ;  In menu.cpp you use std::cout so it means you will also need to #include <iostream>. The fact that you already do so in main.cpp doesn't matter because main.cpp is non-existant as far as menu.cpp is concerned.It's also worth noting that the using std::cout line in main.cpp isn't doing anything helpful since main.cpp doesn't actually use cout anywhere.   ;  Generally speaking, a C++ compiler will compile each source file (.cpp file in this case) in isolation. First, the preprocessor is run on the file (which means, among other things, that the contents of any files that are #include'd will be pasted into the file), and then the source file is compiled.At this point, any expression or symbol that isn't a language token needs to have been declared before it can be used (otherwise, the compiler won't know what it means). Neither std nor cout is a language token; in the case of menu.cpp, what do you expect the compiler to do when they are encountered? (Note that they have not been declared previously in the source file.)(Note that the above is probably an oversimplification of the C++ compilation process, and there may be special cases or exceptions to what I described; but it should hold in general, and it should help lead you to a solution for the problem you mention.)Also, you might have trouble naming a variable main (I guess you'll find out once you get this error fixed :).Finally, note that this has absolutely nothing to do with using classes.   ;  thanks alot guys :D i feel like such a noob now though lol :D   