Saving as a file in C++
Hey,
I'm gonna try and make a console text editor.....to keep up my lack of skill and add to it :) Anyways, I need to know how to save as .txt, how to find .txt files, and then how to open them and edit them. I'm on slackware (Linux) and i have gcc and g++ so it doesn't matter which I use. Also, can someone tell me how to look for certain key stroke-combinations. I would like to use ctrl+S to save, ctrl+O to open....on and on. Thanks, DF |
For keystrokes, see the ncurses programming howto.
For saving and reading a file, see "info libc", especially the "I/O on Streams" and related sections, for finding files, see the "File System Interface" section. See also according manpages of the functions you find useful from libc infopage. Also "info iostream" might be useful if you are working with C++ instead of C. |
awesome thanks!!
is ncurses c/c++ ? [/noob question] |
It is a C library that also has a C++ interface.
|
All times are GMT -5. The time now is 03:30 AM. |