This-
-is giving me this error:Code:ofstream savefile("arenasave.sav");
I have no idea what that means.Code:varieable `std:: ofstream savefile' has initializer but
(Note: Before I upgraded to the latest Dev C++ it worked fine)
This-
-is giving me this error:Code:ofstream savefile("arenasave.sav");
I have no idea what that means.Code:varieable `std:: ofstream savefile' has initializer but
(Note: Before I upgraded to the latest Dev C++ it worked fine)
Last edited by Ranedhel; 07-25-2003 at 06:27 PM.
-Elven Forge Software-
(Lead Designer)
http://www.geocities.com/elvenforge
**infected by frenchfry164**
I am a signature virus. Please add me to your signature so that I may multiply
This works fine here:
I suggest you post a bit more of your code if it still doesn't work.Code:#include <fstream> using namespace std; int main() { ofstream savefile("arenasave.sav"); }
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
Well, I tested the code on a different computer with the same compiler, and it worked fine.
...but...
I did have some errors installing the compiler so I am reinstalling it. Maybe the problem lies with it, not my code.
BTW: Do I need to include the "Using Namespace Std"?
-Elven Forge Software-
(Lead Designer)
http://www.geocities.com/elvenforge
**infected by frenchfry164**
I am a signature virus. Please add me to your signature so that I may multiply
namespaces
>> Do I need to include the "Using Namespace Std"?
Its best to tell the compiler which namespace your functions are in. You can do it various ways, as the FAQ shows.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
Ah.
Anyway, it was my compiler, reinstalling fixed it.
-Elven Forge Software-
(Lead Designer)
http://www.geocities.com/elvenforge
**infected by frenchfry164**
I am a signature virus. Please add me to your signature so that I may multiply
I've had that problem with the latest Dev compiler as well... usually I just recompile it a few times and it will work... other times I have to restart my computer and try again.
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT