[Help]How to make it saveable?

Posts 1–13 of 13 · Page 1 of 1
[Help]How to make it saveable?
Alright, so what I want to do is make a program that takes the numbers from 0-999 and deletes the numbers I want it to from it. It needs to be saveable.


So far, I've managed to get it to delete the one number I want it to, but it needs to be able to delete that number, along with any numbers I type into it in the future too.


So I can't figure out how to make it possible to save, AND delete all numbers that I tell it to. Right now it can only do one at a time...and I need to be able to do as many as I want from the list.

I also want for it to be saveable, as in I type the numbers I don't want to still be there in then save it. Then load it in the future and add more numbers I want gone from the list.


I've been really racking my brain over all this, and I just can't do it. Can anyone help me out or at least point me in the right direction?

Much appreciated and thanks for taking the time to read my questions
I don't get it.

If you type in a number, you choose a number, and it removes every occurance of that number in the number you entered? lolwut?
i think he is asking how he could save a number that he has typed, like he will have the console window and he will type a number then he could save, close the application then load the number that was typed.
well that helped a lot thanks
Doh, I forgot to load my source code (fail). When I get home I'll upload it so you'll be able to better see what I mean.


And no, I don't want to load the number that I entered. I want to generate a list of the numbers 0-999, then I want to be able to type a number in to delete from that list. For example, I type in the number five, and it shows 0-4 and 6-999. Then I type in 34, and it shows 0-4, 6-33, and 35-999.

However, I also need to be able to save the numbers that are left so I can come back at another time and delete more numbers from whats left.


Sorry, didn't mean to poorly word it before.
Quote Originally Posted by tylermp1 View Post
Doh, I forgot to load my source code (fail). When I get home I'll upload it so you'll be able to better see what I mean.


And no, I don't want to load the number that I entered. I want to generate a list of the numbers 0-999, then I want to be able to type a number in to delete from that list. For example, I type in the number five, and it shows 0-4 and 6-999. Then I type in 34, and it shows 0-4, 6-33, and 35-999.

However, I also need to be able to save the numbers that are left so I can come back at another time and delete more numbers from whats left.


Sorry, didn't mean to poorly word it before.
That is INCREDIBLY easy !

Since im on mobile now, i can't type out the code for you (the autocorrect will modify it).

What i can tell you is how to do it. First, create a vector , then populate it with the numbers you DO NOT want. When all is done, use a for loop to write every number , but checking if it's in your ban list first (in which case you just skip it).

That's more efficient than populating it with 900 numbers and faster too.
you also wanna make it when you restart the program?
maybe then you could just write it to a .ini or txt file?
Create an array holding integers 0-999 and iterate through them and delete the ones you don't want..

Basic looping. |:
But that don't work if he also want to have the numbers after a restart of the program.
So if he wants that he should write all the numbers which are left to a file and read this file on the next start


But if he don't want that - I TOTALY AGREE with you
Thanks for all the responses, appreciate the help. ^_^

Havn't solved my problem yet, but I'm thinking it's more due to my green-ness of understanding than the lack of good answers Back to reading the rest of the book.

Quote Originally Posted by Void View Post
Create an array holding integers 0-999 and iterate through them and delete the ones you don't want..

Basic looping. |:

What's basic to someone experienced like you void isn't quite as basic to a pretty new beginner like me ;-)
meh.. simple is simple.. 1 for and 1 if and you are done...

get the banned numbers on the .txt and create a for from 0 to 999, write all except the ones on the file.
erm... check those links about file writing...

then take the advice everyone told you. Loop
Posts 1–13 of 13 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us