Just useful now

3 replies  ·  1 participant

Jan 13, 2012, 09:23 AM#1
You told me it would be better to make useful stuff in c++. Does a passworded user data storgage app sound better? Alomost done :3
Jan 13, 2012, 12:51 PM#2
I got a problem, can someone help me?

add:



cout<< "Data: ";

getline(cin,tempvar);
if (tempvar == "E"||tempvar=="e") {
useractivefile<<"finish";
useractivefile.close();
cout << "File closed. Returning to possible options..."<<endl;
filenamex="";
delay(1);

goto useractive;

}


tempvar.insert(tempvar.length(),"@");
useractivefile<<tempvar;


goto add;

This is the part of my code that writes to the file. But it dupes without any reason.
Here is what i get.

Write your data and type [E]xit when you are done.
Data: Data: (<- why does it dupe here) fdadsf
Data: dfdsafdsf
Data:

Why does it skip the code for no reason?
Jan 13, 2012, 02:20 PM#3
Fixed: used a temporary string wich is goin to to be written to the file when the user wants to close the app, and then with a str.erase i erased the extra stuff
Edit: almost there :3
http://www.mediafire.com/?n68glbdi4gl3czk <- here it is. The book with registers and subregsiters. Still, lots left to add...