So, I'm new to c , and really just programming in general, and decided to do a simple-enough challenge project where the idea is that the user is asked if they have a user is asked if they have an account, if "no" then the user is asked to input a username, password, and message to be held in the account.
The user is then given a referral number for their account which is really just the index that their username, password, and message are each held in their respected vectors.
Once they've done all that the project loops and the user is once again asked if they have an account. If they say "yes" this time then the project asks them for their referral number which it uses to find the user's username from the "username vector". It then asks for the user's password and if they get it correct they are given their message.
So, simple enough, but the project only works until you get to the part where, once you've said "yes" to having an account, you're asked for your referral number. Once you put a number in, the project stops and gives the error: "exited, segmentation fault".
Here's a link to the repl I did it on: https://repl.it/@gimmeyourbread/Login#main.cpp
Please don't hesitate to ask any questions you may have.
Subreddit
Post Details
- Posted
- 4 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/Cplusplus/c...