Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

c++ output file stream.

Status
Not open for further replies.

natasie

Member level 2
Member level 2
Joined
Jul 11, 2011
Messages
48
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,629
hey everyone,

i am trying to to program an mm1 queue and send the data to a file named happy.csv.

below is the simple program that i have used just for example


using namespace std;

int main () {

int item_no=1;
ofstream out("happy.txt");
if (!out){
cout<<"Cannot open file"<<endl;
return 1;
}
out<<"item: "<<item_no<<endl;
out.close();
return 0;
}

i do not know however how this works, is it not supposed to show on the file named happy.csv? each time i simulate it, theres really no output from it.
please anyone like to help my confused state of mind and clarify this up for me?

thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top