Jump to content

C++ help !

AndyLSB

hi guys, i need help building an ATM system for my class, i need it to be able to change my security pin for a new one but i have no idea how to write the code for that, I have everything else finished and i just need that part but i've tried alot of stuff and no clue ... please help :(

Link to comment
Share on other sites

Link to post
Share on other sites

You need to give us some more information about what it is exactly that you want to do, I can't understand what you mean by

1 hour ago, AndyLSB said:

i need it to be able to change my security pin for a new one but i have no idea how to write the code for that

What's the security pin, what are you trying to change it to/from? Are you trying to encrypt/decrypt it or are you just assigning the variable a new value based on the security pin? Have you googled around for a solution? What is it exactly you don't know what do?

Link to comment
Share on other sites

Link to post
Share on other sites

Oh look it's another one of those 'do my homework for me while I contribute absolutely 0 effort' threads.

 

How about no.

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Nuluvius said:

Oh look it's another one of those 'do my homework for me while I contribute absolutely 0 effort' threads.

 

How about no.

its not like that here have a look at my code if you want, the text is in spanish because im from Honduras

CAJERO COMPLETO.txt

Link to comment
Share on other sites

Link to post
Share on other sites

9 hours ago, Spigie said:

You need to give us some more information about what it is exactly that you want to do, I can't understand what you mean by

What's the security pin, what are you trying to change it to/from? Are you trying to encrypt/decrypt it or are you just assigning the variable a new value based on the security pin? Have you googled around for a solution? What is it exactly you don't know what do?

Sorry for not being specific!

first of all, i have to write an "ATM" system and i have already defined a value for the security pin, but one of the options that my ATM has to have is to change the security pin if you decide to, but i dont know how to, because i have already assign an specific security pin for different users and if they decide to change it by running the program they must be able too. 

here is the code i have so far and the "cout" text is in spanish because im from honduras

i just need help with the security pin and yes i've googled the solution but found nothing.

I'm using Dev C++ btw! 

CAJERO COMPLETO.txt

Link to comment
Share on other sites

Link to post
Share on other sites

51 minutes ago, AndyLSB said:

its not like that here have a look at my code if you want, the text is in spanish because im from Honduras

CAJERO COMPLETO.txt

Again, why should I go to the effort of downloading your text file and trying to decipher your work? You haven't even been bothered to follow the guidelines by presenting your code properly i.e. putting it into code tags.

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

Briefly looked at the source code:

 

using namespace std;

Ugh. Don't.

 

Also, this code is amazingly horrible to read thanks to virtually no meaningful indentation.

 

Unbenannt.png.0b594a00ee085a901df06e7d4e198a26.png

 

... u wat m8?

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

11 minutes ago, Dat Guy said:

... u wat m8?

mlv2fXm.gif

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

7 hours ago, Nuluvius said:

Again, why should I go to the effort of downloading your text file and trying to decipher your work? You haven't even been bothered to follow the guidelines by presenting your code properly i.e. putting it into code tags.

ok first of all im new at this and im beginning to learn programming so from what i understand this is a forum for and helping others learning, i would appreciate some helpfull advice from people that know and not this stupid comment criticizing the work of a learning student. 

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, AndyLSB said:

ok first of all im new at this and im beginning to learn programming so from what i understand this is a forum for and helping others learning, i would appreciate some helpfull advice from people that know and not this stupid comment criticizing the work of a learning student. 

You've completely missed the point. It's got absolutely nothing to do with the quality of your work. It has to do with your lack of effort and observational skills, for example:

JC0ejjr.jpg

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

40 minutes ago, Nuluvius said:

You've completely missed the point. It's got absolutely nothing to do with the quality of your work. It has to do with your lack of effort and observational skills, for example:

JC0ejjr.jpg

instead of argue with me you could have just helped me and told me what to do next time i need help and be done with this, so what i didnt use the tags ? nobody will be harmed if i use them or not, i just need help right away and again if you're not going to help becuase you don't care then get lost, simple as that and maybe someone else my want to help me.

Link to comment
Share on other sites

Link to post
Share on other sites

58 minutes ago, AndyLSB said:

instead of argue with me...

No one is arguing with you. 

59 minutes ago, AndyLSB said:

...you could have just helped me and told me what to do next time i need help and be done with this...

That is exactly what I did.

1 hour ago, AndyLSB said:

...so what i didnt use the tags ?

Unfortunately it serves to highlight/compound your lack of effort.

1 hour ago, AndyLSB said:

...nobody will be harmed if i use them or not...

You seem to be missing the point yet again:

1 hour ago, AndyLSB said:

...i just need help right away...

Your desire for expedient help is 'harmed'; first by your lack of effort and now by your obnoxious attitude since being called out on it:

1 hour ago, AndyLSB said:

if you're not going to help becuase you don't care then get lost, simple as that... 

You made another mistake in statement: You made the assumption that 'I don't care'. Perhaps you should ask yourself why I'd still be replying to you if that were true. I'm trying to get you to pay attention to detail.

1 hour ago, AndyLSB said:

...maybe someone else my want to help me

It's unlikely. We see a few of these crop up from time to time. Many of us have jobs and a few of us have families. Quintessentially you're asking us to donate some of our time to help you with your problems... The least that you could do is to show some effort and meet us half way don't you think. Of course you're always welcome to wait.

 

 

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

13 hours ago, AndyLSB said:

first of all, i have to write an "ATM" system and i have already defined a value for the security pin, but one of the options that my ATM has to have is to change the security pin if you decide to, but i dont know how to, because i have already assign an specific security pin for different users and if they decide to change it by running the program they must be able too.

The problem is that you have this over-arching problem, that you need to split into smaller problems.

I'm not going to give you the code to do it, but here is a general overview of what you probably need to do:

When you ask the user if they want to change their security pin (I'm not sure exactly how you do it, I'm sorry I don't speak Spanish), you just need to prompt the user to input a number for example "1234", then convert that number to an integer and store it in the variable you're using for the security pin.

 

If you wanted to go a step further you could probably have a collection of names and their associated pins, credit card numbers, etc. in a JSON file (or a text file, but that would mean you would have to have an arbitrary formatting for the text file, which wouldn't be very expandable, so they don't have to enter their details every time they run the program, you could just prompt them with a "Are you new [Y/N] > ", or something similar.

 

I hope this broke the problem down a little bit so you could understand it better, good luck with your project! :D

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, Nuluvius said:

No one is arguing with you. 

That is exactly what I did.

Unfortunately it serves to highlight/compound your lack of effort.

You seem to be missing the point yet again:

Your desire for expedient help is 'harmed'; first by your lack of effort and now by your obnoxious attitude since being called out on it:

You made another mistake in statement: You made the assumption that 'I don't care'. Perhaps you should ask yourself why I'd still be replying to you if that were true. I'm trying to get you to pay attention to detail.

It's unlikely. We see a few of these crop up from time to time. Many of us have jobs and a few of us have families. Quintessentially you're asking us to donate some of our time to help you with your problems... The least that you could do is to show some effort and meet us half way don't you think. Of course you're always welcome to wait.

 

 

you're right, i'll do that next time, thanks.

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, Spigie said:

The problem is that you have this over-arching problem, that you need to split into smaller problems.

I'm not going to give you the code to do it, but here is a general overview of what you probably need to do:

When you ask the user if they want to change their security pin (I'm not sure exactly how you do it, I'm sorry I don't speak Spanish), you just need to prompt the user to input a number for example "1234", then convert that number to an integer and store it in the variable you're using for the security pin.

 

If you wanted to go a step further you could probably have a collection of names and their associated pins, credit card numbers, etc. in a JSON file (or a text file, but that would mean you would have to have an arbitrary formatting for the text file, which wouldn't be very expandable, so they don't have to enter their details every time they run the program, you could just prompt them with a "Are you new [Y/N] > ", or something similar.

 

I hope this broke the problem down a little bit so you could understand it better, good luck with your project! :D

thanks for the help man but i'm still blocked in the change security pin menu i wrote 

#undef "variable" but for it to save the new value is what i cant do. if i want to go and change user i must be able to use the new password. i've tried alot of stuff

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, AndyLSB said:

you're right, i'll do that next time, thanks.

Well you could just edit your post/s.

4 hours ago, AndyLSB said:

i'm still blocked

That way you may get more help.

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

14 hours ago, AndyLSB said:

iso what i didnt use the tags ? nobody will be harmed if i use them or not, i just need help right away...

You do realize some of us will actually try your code and possible modified solution code as to make sure the given answer actually compiles and works. Code that's been posted properly, with the code tags, can be copy pasted, a picture cannot. If you expect ppl to manually re-type your code in order to test it you'll be waiting for a long time.

Link to comment
Share on other sites

Link to post
Share on other sites

In addition nobody wants to download a random file that the forums will not automagically format and put up in the post. You can convince us all you want you sent a .txt file, but I'm not going to download it.

 

At the very least, use something like Pastebin.

Link to comment
Share on other sites

Link to post
Share on other sites

On 4/7/2017 at 11:34 PM, Nuluvius said:

Well you could just edit your post/s.

That way you may get more help.

show me how to post it properly i dont understand and if no one else is whilling to help me then fine i going to look for help some place else, its fine.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, AndyLSB said:

show me how to post it properly i dont understand and if no one else is whilling to help me then fine i going to look for help some place else, its fine.

I don't really enjoy repeating myself:

On 04/07/2017 at 7:56 PM, Nuluvius said:

You've completely missed the point. It's got absolutely nothing to do with the quality of your work. It has to do with your lack of effort and observational skills, for example:

JC0ejjr.jpg

Did you follow the link provided?

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×