| | |
Problems with character strings
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2004
Posts: 1
Reputation:
Solved Threads: 0
Well hallo comrades, just been having problems with character strings. Wrote a program that requires typing in of information yet it wasn't possible to represent the character strings in a comfortable manner for whoever is to use the program. Also is there a possible way to make the inputing of a password be in a format not seen by another during input e.g. ******* characters during input. Still polishin on proceedural programming C++. Sent a program with its executable part as an attachment. Just a simple one, any opinions on how to make a more realistic and useful program? Phone number to begin the program is 720797278. Gud day!
Hi there I took a look at the code and yes there is a MUCH better way to get it to be user friendly. Have you thought about the use of the ANSI c++ string class (#include <cstring>)? I believe there is a code snippet showing some functions on the c/c++ snippets forum. If not try http://www.msoe.edu/eecs/ce/courseinfo/stl/string.htm as a guide. This will allow your users to input text and allows you to analyze their input! if you want options/multi-choice questions then I would stick with numbering the responses. Hope this helps
http://sales.carina-e.com
no www
no nonsense
coming soon to a pc near you! :cool:
no www
no nonsense
coming soon to a pc near you! :cool:
i had another look and realised its pretty much multiple choice so the string class may not be that simpler. however use of a switch statement would clean up the code a bit
again a google seach for the switch statement should proove useful.
C++ Syntax (Toggle Plain Text)
switch (variable) { case value1: { // process code if variable == value1 } break; case value2: { // process code if variable == value 2 } default: { // no matches, process code if variable did equal any of the cases } break; };
again a google seach for the switch statement should proove useful.
http://sales.carina-e.com
no www
no nonsense
coming soon to a pc near you! :cool:
no www
no nonsense
coming soon to a pc near you! :cool:
![]() |
Similar Threads
- Need help with strings in C programming (C)
- connecting characters (C)
- Enter string to the next line (C++)
- muliplying without using a * operator! (C++)
- Sorting character arrays! (C++)
- Reversive Array/Integer (C)
Other Threads in the C++ Forum
- Previous Thread: Urgent:need Help
- Next Thread: Reversing a string?
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game getline givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news node output parameter pointer problem program programming project proxy python read recursion recursive reference return rpg string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets





