I am finishing up my program to simulate a tollbooth by using classes. What happens is cars passing by the booth are expected to pay a fifty cent toll. The program keeps track of the number of cars that have gone by (paid and unpaid), and the total money collected.
The two data items are of type int to hold the total number of cars and type float to hold the total amount of money collected.
A constructor...
The following is supposed to print out a two dimensional array but instead it crashes at the end. If anyone could take a look and notice any problems i could sure use the help. Thanks
Im having trouble with the last part of an assignment of storing a user defined string into a one dimensional array. If anyone can help it would be much appreiated. Here's what it requests:
Prompts the user to enter a string and store it into one-dimensional array.
Replace the content of the string with the string reversed and save into another array.
Print both the original string and reversed one in this function.
How would i loop this switch statement if the user does not want to quit after running the selection, lets say 'S'. I tried a do while loop but it only causes errors. Thanks!
char choice;
do{
switch (choice)
{
case 'V': case 'v':
voltage ();
break;
case 'S': case 's':
rev_str();
break;
case 'Q': case 'q':
cout << "Program...
Leave a comment: