LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Saving as a file in C++ (https://www.linuxquestions.org/questions/programming-9/saving-as-a-file-in-c-200501/)

dfownz 07-02-2004 08:44 PM

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

ToniT 07-02-2004 09:29 PM

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.

dfownz 07-03-2004 07:39 AM

awesome thanks!!

is ncurses c/c++ ?

[/noob question]

ToniT 07-03-2004 08:39 AM

It is a C library that also has a C++ interface.


All times are GMT -5. The time now is 03:30 AM.