Computer Science Canada File I/O |
Author: | The_$hit [ Wed Jul 27, 2005 12:43 pm ] |
Post subject: | File I/O |
My Program has created a file That is called Stock.txt And when i run the program once it puts all of the appropriate data to the file. but the next time i run the program it does not append the file but instead concates it. Please Help Me. I would sumbit thhe source code but it is all jumbled up with Carbon code also. |
Author: | wtd [ Wed Jul 27, 2005 12:53 pm ] | ||
Post subject: | |||
In programming parlance, "append" and concatenate" generally mean the exact same thing. What's the actual problem? Did it overwrite the contents of the file, rather than appending the new output to the end of the existing file? If so, you need to open the output file for appending.
Also, why in the name of everything unholy are you messing with Carbon rather than Cocoa? For that matter, why are you dealing with GUIs at all when you're still asking questions about something as fundamental as file IO? |
Author: | [Gandalf] [ Wed Jul 27, 2005 4:01 pm ] |
Post subject: | |
wtd wrote: Also, why in the name of everything unholy are you messing with Carbon rather than Cocoa?
What are Carbon and Cocoa? Are they GUI frameworks for C++? Also, I saw some of your posts yesterday while searching around the ubuntu linux forums . |
Author: | The_$hit [ Wed Jul 27, 2005 4:37 pm ] | ||
Post subject: | |||
I have the included line. and sry i meant to say truncate instead of concate. But it deletes what was previosly stored in the file and overwrites it with new data. The Reason Why i am learning Carbon is because i am making an accounting application for my friend who is running Mac OS 9.2. CoCoa runs only on OS X. The function that i Managed to seperate from the rest of the code is:
|
Author: | wtd [ Wed Jul 27, 2005 5:56 pm ] |
Post subject: | |
[Gandalf] wrote: wtd wrote: Also, why in the name of everything unholy are you messing with Carbon rather than Cocoa?
What are Carbon and Cocoa? Are they GUI frameworks for C++? GUI (and other things related) frameworks for Mac OS X (and Mac OS 9.x for Carbon). Carbon is primarily a C++ framework, and Cocoa primarily an Objective-C framework. |
Author: | wtd [ Wed Jul 27, 2005 5:56 pm ] |
Post subject: | |
The_$hit wrote: i am making an accounting application for my friend who is running Mac OS 9.2.
Ah. Good luck. |
Author: | The_$hit [ Fri Jul 29, 2005 4:38 pm ] |
Post subject: | |
The Carbon Code is almost complete but the c++ File I/0 is what i am stuck on. |