Well... which language, C or C++? C-Free is just an IDE, it tells us nothing about which of the two languages you're using.
Alright, just got the edit... there's a few problems from what I can see:
1: What is "int void()"? Void is a reserved word, you can't call that function void. I think you wanted to call it "main", since that's the function all C/C++ programs start at.
2: You're using <stdio.h>, and then using cin/cout. cin/cout are C++, and stdio.h is C. There's nothing wrong with using C libraries in C++, however cin and cout aren't declared in stdio.h, they're declared in iostream, so you'll need to #include <iostream> instead. stdio.h has printf, scanf, and a bunch of other input/output functions for C.
3: char horoscope isn't going to do what I think you want it to. "char" means a single character, it does not insinuate anything about a string. Since you're using C++ (because you've got cin/cout), I'd suggest you #include <string> next to the rest of the includes, type "using namespace std;" in your new int main(), and then declare "horoscope" as a string, instead of a char, like so:
#include <iostream>
#include <string>
int main()
{
using namespace std;
string horoscope;
cout << "What is your zodiac sign?";
getline(cin, horoscope);
// yada yada...
4: You cannot compare char arrays by using a single equals sign. = is not a comparison operator, it's an assignment operator, which means it'd make horoscope equal to "Virgo" and then return true, so it'll execute that one no matter what. To compare something, you use two equals signs (==). Despite that, it still won't work with char arrays, when you're using a char array, you should use the C stdlib.h strncmp() function instead of equal signs. if you've taken my advice and are instead using a std::string, you'll want to instead use the string's built-in compare function, like so:
if (horoscope.compare("virgo") == 0)
That will compare the string properly.
5: Finally, you're using cout and cin without declaring
using namespace std. This is fine... so long as you prepend the "std::" scope in front of it, since cin, cout, and endl all live within the std namespace. You otherwise cannot access them, so either place "std::" in front of all of them or use
using namespace std. I discourage the use of using namespace std for any non-trivial program!
Alright, that's what I saw so far. I apologize for raking through everything, but I like to be thorough, and if you're ready to learn to program, you might as well get into good practices now.
Edited by ZekeDragon, 13 October 2009 - 01:22 PM.
Small bug with compare statement. :P