ughhhhhhhhh totally erased this because my question was dumb and i actually did figure out what i did wrong.
ughhhhhhhhh totally erased this because my question was dumb and i actually did figure out what i did wrong.
Last edited by helloalyssa; 09-28-2010 at 01:59 PM.
This is how you define vars of the same type in one line:
When you define a variable, you put a semicolon at the end - ;Code:int father, mother, daughter, son; string one, two, three, four;
Also, you know, you can have a runtime error if your file will not open.
Code:outputFile.open("SalesTaxData.txt"); if (outputFile.good()) { // now you can work with the file, } else { // here you can provide the user with error message }
If you want people to help you, try to provide Short, Self Contained, Correct (Compilable), Example, and Don't be a Help Vampire!
C++ Super-FAQ - CppCon videos - C++14 latest draft (n3797) - C11 latest draft (n1570)
Boost - GCC 6.1.0 - Clang - GDB tutorial - Valgrind - Programming in 21 days
ugh i don't know why i had commas. anyway i thought i fixed it but it still cuts off (it just ends) after it displays "please enter the year for this report:".
And that would be because you need to actually ask the user for the data, not only write a comment about it in source code.
If you want people to help you, try to provide Short, Self Contained, Correct (Compilable), Example, and Don't be a Help Vampire!
C++ Super-FAQ - CppCon videos - C++14 latest draft (n3797) - C11 latest draft (n1570)
Boost - GCC 6.1.0 - Clang - GDB tutorial - Valgrind - Programming in 21 days
look you don't need to be excessively sarcastic if you think my question is silly, i already know it is.
i am asking the user for data.
and no, neither month or year contain data because i'm supposed to input them when i'm running the program.
helloalyssa, was that really *overly* sarcastic? Well, maybe you could paste your code again, with the fixes, for us to see why it still doesn't work. Because at the snippet above there is no code that would actually ask the user for data. You know, std::cin or something like std::getline().
If you want people to help you, try to provide Short, Self Contained, Correct (Compilable), Example, and Don't be a Help Vampire!
C++ Super-FAQ - CppCon videos - C++14 latest draft (n3797) - C11 latest draft (n1570)
Boost - GCC 6.1.0 - Clang - GDB tutorial - Valgrind - Programming in 21 days