iostream not found?

2. Help
2013-11-24
2013-11-24
  • Master Maniac
    Master Maniac
    2013-11-24

    I've recently started using notepad++ to learn C++ coding. However, on my first (and most basic script) I've run into an issue. I'm not sure if this is the proper forum to post this in, but any help is appreciated.

    Here is my script:

    include (iostream.h) //this is posted without the hash to prevent hashtagging And also the parentheses are supposed to be the ">" marks

    using namespace std;

    int main(){
    cout<<"This is only a test /n";
    cin.get();
    return 1;
    }

    HOWEVER, when I run this using nppexec, it returns this error for every line:

    CreateProcess() failed with error code 2:
    The system cannot find the file specified.

    I've got microsoft visual C++ installed, and my OS is windows 8. I have no way of finding my iostream file (if its even there, searching from the start menu turned up empty). Again, any help would be greatly appreciated :)

     
    Last edit: Master Maniac 2013-11-24
  • Loreia2
    Loreia2
    2013-11-24

    Hi,

    Notepad++ is just a text editor, it is not a compiler.

    Start Visual studio, create new console project, copy that program into Visual studio editor, hit F5 (or ctrl+F5) and your program will start. If Visual studio complains about that string, just enclose it TEXT macro. Like this cout<< TEXT("This is only a test /n");

    Also, make sure you don't mix backslash and forward slash. Newline is \n.

    BR,
    Loreia