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 :)

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.