Allright I played around with everything fixed my small errors; and I got it running but the problem im experiencing now well heres the code
Code:
// survey.cpp - This is a survey of 20 Christmas questions, The program will ask, user will answer, program will save answers then print.
// Created/Revised by <Jeff Shaffer> on <11-27-06>.
#include "stdafx.h"
#include <iostream>
#include <string>
using std::cout;
using std::cin;
using std::endl;
using std::string;
int main()
{
//Declare string variables
string name = "";
string ans1 = "";
string ans2 = "";
string ans3 = "";
string ans4 = "";
string ans5 = "";
string ans6 = "";
string ans7 = "";
string ans8 = "";
string ans9 = "";
string ans10 = "";
string ans11 = "";
string ans12 = "";
string ans13 = "";
string ans14 = "";
string ans15 = "";
string ans16 = "";
string ans17 = "";
string ans18 = "";
string ans19 = "";
string ans20 = "";
//Enter input data
cout << "Enter your full name: ";
getline(cin, name);
cout << "This survey consists of 20 basic questions"<<endl;
//Program asks the user the question, user types in answer and program saves the answer
cout << "Hot chocolate or apple cider: ";
getline(cin, ans1);
cout << "Turkey or Ham: ";
getline(cin, ans2);
cout << "Do you get a fake or 'real cut' Xmas tree: ";
getline(cin, ans3);
cout << "Decorations on the outside of your house: ";
getline(cin, ans4);
cout << "Snowball fights or sledding: ";
getline(cin, ans5);
cout << "Do you like hanging around the fireplace because its warm: ";
getline(cin, ans6);
cout << "Do you enjoy xmas shopping: ";
getline(cin, ans7);
cout << "Favorite christmas song: ";
getline(cin, ans8);
cout << "Take a break, you at 9/20 "<<endl;
cout << "how do you feel about christmas movies: ";
getline(cin, ans9);
cout << "when is it to early to start listening to christmas music: ";
getline(cin, ans10);
cout << "Stockings before or after presents: ";
getline(cin, ans11);
cout << "do you like christmas carolers: ";
getline(cin, ans12);
cout << "go to someone elses house or they come to yours: ";
getline(cin, ans13);
cout << "do you read the christmas story the night before christmas: ";
getline(cin, ans14);
cout << "Do you enjoy christmas?: ";
getline(cin, ans15);
cout << "Did you get someone a gift: ";
getline(cin, ans16);
cout << ": Do you think you'll get any presents: ";
getline(cin, ans17);
cout << "what do you eat for christmas dinner: ";
getline(cin, ans18);
cout << "Do you beleive in Santa Clause: ";
getline(cin, ans19);
cout << "Thanks for taking our survey, Your all finished" << endl;
//Displaying the answers for the survey instructor to copy down
cout << "Please do not close the program, The instructor will now begin to copy down your answers" >> endl;
cout << "Answer #1:" << ans1 << endl;
cout << "Answer #2:" << ans2 << endl;
cout << "Answer #3:" << ans3 << endl;
cout << "Answer #4:" << ans4 << endl;
cout << "Answer #5:" << ans5 << endl;
cout << "Answer #6:" << ans6 << endl;
cout << "Answer #7:" << ans7 << endl;
cout << "Answer #8:" << ans1 << endl;
cout << "Answer #9:" << ans8 << endl;
cout << "Answer #10:" << ans10 << endl;
cout << "Answer #11:" << ans11 << endl;
cout << "Answer #12:" << ans12 << endl;
cout << "Answer #13:" << ans13 << endl;
cout << "Answer #14:" << ans14 << endl;
cout << "Answer #15:" << ans15 << endl;
cout << "Answer #16:" << ans16 << endl;
cout << "Answer #17:" << ans17 << endl;
cout << "Answer #18:" << ans18 << endl;
cout << "Answer #19:" << ans19 << endl;
cout << "Answer #20:" << ans20 << endl;
} // end of main function
I get like 45 error when i compile that, Their random errors that talk about stuff that does involve my code at all, IT worked fine until I added
Code:
//Displaying the answers for the survey instructor to copy down
cout << "Please do not close the program, The instructor will now begin to copy down your answers" >> endl;
cout << "Answer #1:" << ans1 << endl;
cout << "Answer #2:" << ans2 << endl;
cout << "Answer #3:" << ans3 << endl;
cout << "Answer #4:" << ans4 << endl;
cout << "Answer #5:" << ans5 << endl;
cout << "Answer #6:" << ans6 << endl;
cout << "Answer #7:" << ans7 << endl;
cout << "Answer #8:" << ans1 << endl;
cout << "Answer #9:" << ans8 << endl;
cout << "Answer #10:" << ans10 << endl;
cout << "Answer #11:" << ans11 << endl;
cout << "Answer #12:" << ans12 << endl;
cout << "Answer #13:" << ans13 << endl;
cout << "Answer #14:" << ans14 << endl;
cout << "Answer #15:" << ans15 << endl;
cout << "Answer #16:" << ans16 << endl;
cout << "Answer #17:" << ans17 << endl;
cout << "Answer #18:" << ans18 << endl;
cout << "Answer #19:" << ans19 << endl;
cout << "Answer #20:" << ans20 << endl;
Someone shine some light on me? ALSO my original plans were to PRINT the answers but i wasnt sure the print syntax.. if anyone could maybe tell me that then I would rather print then just say the answers back. Thank you