I hope I'm in the right spot to ask this programming question. I'm looking for the "C" programming spec's that is equivalent to which the users invokes the windows 10 run dialog box by keystrokes. I like to see the option on my windows sidebar to click on. Is there a place(website) out on the internet that shows the ideas and some spec's and examples on how to put this simple programming idea, in "C", together. Any help sure be appreciated. Thanks,
Bigman arnold :line1
blue 123 green 2, 234 green :line3
arctic 34 :line4
The thing i have to do is modify the out put from the txt file.
There are many more lines.
I have to modify it so the output from the files so it becomes like this:
arnold Bigman :line1
blue 123 green 2, 234 green :line 2
arctic 34 :line3
And the lines continues for the rest of the txt file.
I'we been trying ifstream with a while(file>>string1>>string2>>getline(zzzzz, file)
But i get an error im totally of.
Sometimes there are only 3 lines for the adress and sometimes 4.
So are you needing to know how to read from one file and write to another, how to swap strings, or something else? I see no pattern in your input/output (e.g., line 1 swaps the two words, line 2 moves to line 4).
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
I cannot compile this program.
Please help me because I have no idea how I do it, my teacher spent this activity and I found it very difficult.
After completing an option, the program must return to the initial menu until "0" is pressed.
int item ; // matrix that will store how many items have been releasedint op,vaga,i,j;
floatvalue; //matrix that will store the total valuefloat box = 0; /// variable that will store the value of the box
printf ("|*--------------------Welcome to the restaurant! -------------------- *|\n");
printf("  Open table\n");
printf("  Launch expense\n");
printf("  Close table account\n");
printf("  Check Cashier\n");
printf("  Exit\n");
printf("\n Choose an option:");
// should receive only one character which are the (1,2,3,4,0) without the need to prefix the enter any other number should be disregarded.
printf("Leaving the Program");
printf ("Enter table number:");
if (item>=-1) printf("%d table open");
elseif (item<= 0)
printf("Error that table is not free. Choose another table!");
printf("Value launched on table");
printf("Placement amount: %d");
printf("Total value of the table:R$ ");
if (table>=-0) printf("%d table open");
elseif (table<= -1)
printf("Error that table is not open!");
printf("The table has just been closed");
// the total value of the table and the amount of posted items that are in (case 2) appearbreak;
printf("The total value in the box: R$%.2f");
// the total value of the box of all the tablesbreak;
the second one is missing the variable where you want the data to go.
Similarly with the printf() statements
printf("Placement amount: %d");
you're specifying an integer to be output with the %d, there isn't a corresponding value.
printf("Placement amount: %d", value); //<== value to print
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
Last Visit: 31-Dec-99 19:00 Last Update: 21-Jan-21 3:04