Hi, I've been learning the C++ syntax for about 3 months now (on my own) and I don't really see how I can make any sort of "long" program that is at least 500 lines long, I've only managed to get 170 with a tic-tac-toe console game. If you have any C++ program source codes lying around, I'd appreciate it if you could post it here. I won't use it for anything, I just want to see how the format works.
P.S. if anyone asks, I can provide the code for the tictactoe program.
Of course, normally I would advocate against using namespace, but I can't be bothered to go through the code and see what exactly is being used. I may have missed a header or two, too, but it should work.
I also couldn't compile in VS 2013. One problem is that it uses some of the newest features in C++11 and also because of the missing include file. Maybe he will post the include file.
Compiled using g++
Apologies for not posting the header file.
I must say that Im a beginner and new.
After compiling, open program and type "help" for basic how to use
Its very simple program
I'm a beginner too, but how do you use that header? Do I just paste it in?
No, but close. On your compiler there is an option for creating a .h file. Choose that and create one. Name it std_lib_facilities and be sure to save it in the same location as the cpp file. Then copy ephraimr's code into that header file, and it should work (given that you included it in your main cpp)
Of course, normally I would advocate against using namespace, but I can't be bothered to go through the code and see what exactly is being used.
usingnamespace std; is part of that header file, iirc.
To use the header, just save it with the .h extension, instead of .txt, and put it in with the rest of your code files. Instead of "add new" in your IDE choose "add existing", or whatever the equivalent is.