can we send the input from command prompt screen to the text file in C++ if anyone know plz tell me about it briefly

Recommended Answers

All 5 Replies

#include <cstdlib>

int main( void ) {
  system( "dir>output.txt" );
  return 0;
}

Problem #1: Your title. See this

can we send the input from command prompt screen ...

Problem #2: A command prompt screen does not contain input. A screen is an output device.

....to the text file in C++

Problem #3: C++ does not contain a text file. C++ can read a text file, but a screen is not a text file.

....to the text file in C++ if anyone know plz tell me about it briefly

Problem #4: Is there supposed to be a period (.) somewhere in that sentence? We do like to be able to understand the questions posted, so please try to post understandable questions.

So please rethink how to ask your question and try again.

And about plz, see this

I have a project on ATM machine,and i want to enter the account NO,passwprd , opening Balance etc. in the text file from the user (using "cin") and save that record in text file.

I have a project on ATM machine,and i want to enter the account NO,passwprd , opening Balance etc. in the text file from the user (using "cin") and save that record in text file.

You have to read file using ifstream classes.

I have a project on ATM machine,and i want to enter the account NO,passwprd , opening Balance etc. in the text file from the user (using "cin") and save that record in text file.

And your question is....? Since your statement mentions the very basics you should have already learned, you should be able to do at least the input portion.

Have you read any of the recommended posts? We do not write code for you. We help you with the code you write.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.