| | |
need help in creating simple line editor
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2004
Posts: 13
Reputation:
Solved Threads: 0
hi! i'm trying to make a simple line editor...
i have two main questions in mind:
1.) what's the syntax to make the cursor appear at the middle, or at the bottom part of the screen...or how can you print something and make it appear at a certain position
2.) what's the syntax to load a text file using a c++ program...
please help...we haven't discussed it in class... :cry:
thanks!
i have two main questions in mind:
1.) what's the syntax to make the cursor appear at the middle, or at the bottom part of the screen...or how can you print something and make it appear at a certain position
2.) what's the syntax to load a text file using a c++ program...
please help...we haven't discussed it in class... :cry:
thanks!
•
•
Join Date: Sep 2004
Posts: 40
Reputation:
Solved Threads: 1
•
•
•
•
what's the syntax to load a text file using a c++ program...
C++ Syntax (Toggle Plain Text)
#include <fstream> //include this standard template library char filename[16]; //declare a variable string this one is 16 characters long string line; //decalare a string variable cout << "Enter the name of the program that you would like data for: "; cin >> filename; ifstream instream(filename); if(instream.fail()) //This will check to see if the file open fails for whatever reason { cout << "Input file opening failed.\n"; exit(1); } while ( getline(instream, line) ) //this will read the file in line by line
1) Platform and implementation dependent. What compiler and OS are you using?
2) This is in any book on C++.
>please help...we haven't discussed it in class...
You'll be in big trouble if you wait until everything is discussed in class before you do your own research.
2) This is in any book on C++.
>please help...we haven't discussed it in class...
You'll be in big trouble if you wait until everything is discussed in class before you do your own research.
New members chased away this month: 3
>i can't find a useful book on how to make the cursor go to a certain part of the screen or something
What part of "platform and implementation dependent" is difficult? If you're looking for a book that tells you how to do this, it's going to be very specialized and thus very difficult to find. I have six letters for you, G.O.O.G.L.E. A braindead search will still give you something to work with.
What part of "platform and implementation dependent" is difficult? If you're looking for a book that tells you how to do this, it's going to be very specialized and thus very difficult to find. I have six letters for you, G.O.O.G.L.E. A braindead search will still give you something to work with.
New members chased away this month: 3
![]() |
Similar Threads
- simple text editor (C++)
- help with line editor (C++)
- A simple text editor. How??!! (C++)
- Help with Creating a Command Line Menu (C++)
Other Threads in the C++ Forum
- Previous Thread: Why doesn't my code work??
- Next Thread: Borland C++ builder - how to save in .CPP format
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file forms fstream function functions game generator getline givemetehcodez graph homeworkhelper iamthwee ifstream image input int java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






