why this function keeps the file overwritten? i'm using c++ on xcode

0 Kandika Bagaskara · April 16, 2015
void highscore2 () 
{
ofstream file2 ;
ofstream.open ("highscore.txt" , ios::app) ;

file2 << nilai ;
// nilai is score in my language

file2.close () ;
}

if you guys need the whole program, please ask me :)

Post a Reply

Replies

Oldest  Newest  Rating
0 Kandika Bagaskara · April 17, 2015
yes i wrote it wrong here but not on my program.
I write it 
file2.open("highscore.txt", iOS::app)

but it still overwritten the file

please help!
  • 1

C++

107,007 followers
About

Used in many types of software including music players, video games, and many large scale applications.

Links
Moderators
Bucky Roberts Administrator