- DTA MoonDawg
- |
- Exalted Mythic Member
Halo: CE Anniversary Achievement Idea
C-C-C-CANNON BREAKER!
Let Sgt. Johnson die on Halo.
Posted by: HaloBeforeHoes
Posted by: DTA MoonDawg
Posted by: HaloBeforeHoes
Posted by: L00
Is there something specific you're trying to accomplish with them?
Yes, I am trying to use them in a program that tells me a password.
In the program a question is asked and the password is granted if you have the right response. Would the user be able to enter "true" or "false" as a response to a question if I use bool as you showed?
Are you using character arrays or Strings to process the question's response?
Wow lol I just figured out what those two are. I plan to use character arrays.
Personally, I would prefer Strings over character arrays for what you are trying to do. I've been working with Java this past semester, so I could be wrong, but I distinctly remember being able to compare two strings in C++ with the "==" operator. You don't have to mess with any string compare functions to see if the response is correct. If you use character arrays, you may have to iterate through the entire array to see if each character matches.
ALSO, character arrays can only be set to a specified length. If you add any more characters than that, your program will crash. Strings have no limit.