vendredi 2 février 2018

C++ Beginner. cout not outputting string into console?

So I'm following along with Bjarne Stroustrup's book "Programming: Principles and practice using C++" and I've already run into a problem I am struggling to solve (I've spent an hour+ trying to figure out on my own with 0 progress.)

He suggests using his custom header file, which I've copy and pasted into a new header file. Header file: http://stroustrup.com/Programming/std_lib_facilities.h

Now, I'm to write a simple hello_world program that outputs "Hello, world." string in console. However, when I run the program all it says is "Press any key to continue..." with no strings output.

This is the program (My code is identical to the books.)

#include "../../std_lib_facilities.h"

int main() {

cout << "Hello, world!\n";
keep_window_open();
return 0;

}

Aucun commentaire:

Enregistrer un commentaire