Re: [Dev-C++] HELP---Read/Write Files in Dev C++
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Luigi S. <gi...@li...> - 2001-09-25 11:09:13
|
Hi! I've tried the code that you posted (I broke it into 3 files then used Dev-C++ to make a project, compile the project and run it) with the following as "in.data": in.data --------- 3 2 2.5 2 3 3 2.5 3 -- It produced the following output: out.data ------------ 3^2 = 9 2.5^2 = 6.25 3^3 = 27 2.50^3 = 15.62 -- So it looks Ok to me. At 14.27 24/09/01 -0700, you wrote: >I have a program that complies and runs in both >Microsoft C++ 6.0, and my schools Dec Unix C++ >complier. I opened a new project in Dev C++ make it a >console application. I added these three files to my >project pwrpro.h, pwr.cpp, runpwr.cpp The program >compiles with no errors. The problem is that this >program should read data from a file and the then >write a new file, with calculations in it. It writes a >blank file. I am wondering if I am missing something >for it to work correctly in this IDE. When i do not >put my file in.data in the directory it correctly >prints "the file is not found" in the output file. -- gisan gi...@li... |