Question: How can i plug my code into this to make it work? Here's my code: body { background-image: url(coffee.jpg); background-color: #8B4513; } What is your

How can i plug my code into this to make it work? Here's my code:

What is your favorite Cofeee?

Espresso (Short Black)
Double Espresso (Doppio)
Long Black (Americano)
Long Macchiato.
Short Macchiato.

Results

(percents rounded)
Coffee Name Number Percent
None%
Espresso (Short Black).%
Double Espresso (Doppio).%
Long Black (Americano).%
Long Macchiato.%
Short Macchiato.%
Raw Data

Move the struct FIELDS and class WebApps to its own header file, named WebApps.h. We are going to leave the function definitions inline within the class, for simplicity-sake (though not ultimately recommended by industry)

Read more info on Header Files.

WebApps.h needs to live in the same directory as survey.cpp, so that it is available at compile time - we do not compile .h files manually.

WebApps.h should contain the same includes as survey.cpp, the ifndef/define/endif directives, as a regular header file does, the FIELDS struct, and the class, pretty much exactly as already working properly in retrieve_form_OOP_2.cpp.

Check out the FileApps.h

header file below as an example to follow for WebApps.h. All the main program needs now is an 'include' to the header file and should compile and run.

Create a temporary web_form_survey.html, based on the older web_form.html to test the program until it runs as before (in retrieve_form_OOP_2.cgi).

At this point, since this program is self referential, its first state is to serve the HTML form for the survey. From here, the current code in main should be replaced completely (might be good to just comment the whole thing and leave at the bottom of the program to reuse some of the code later) and start from the following skeleton (copy from this :

WebApps wo; void build_form(); int main() { const int cnt = wo.get_cnt(); if (cnt != 0) { cout << "debug with cnt != 0 " << endl; }else { build_form(); } return 0; } ////////////functions///////////// void build_form () { cout << "Survey Vote" << " " << "
" << " Will it be a Yes or a No? " << " " << " " << " " << "

" << "

" << "

" << " " << " "; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!