![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Sep 2004
Posts: 15
Rep Power: 0
![]() |
I just tryed to compile this code:
#include <iostream>
int main ()
{
int age
cout<<"Asl?";
cin>>age;
if (age<50)
{
cout<<"wow, your young";
}
else if (age==100)
{
cout<<"jesus, old guy";
}
else
{
cout<<"foocking hell, dont break a hip grandpa";
}
return 0;
}With dev-C++, it is coming up with a lot of errors, what is wrong with it? Thanks. |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
cout is in iostream.h. When using iostream, you must tell the compiler you're using the Standard Template Library, either by using std::cout instead of cout, or by typing using namespace std; after your #include directives.
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Sep 2004
Posts: 15
Rep Power: 0
![]() |
Hmm, that didn't solve anything.
#include <iostream>
using namespace std;
int main ()
{
int age
cout<<"Asl?";
cin>>age;
if (age<50)
{
cout<<"wow, your young, Sorta";
}
else if (age==100)
{
cout<<"jesus, old guy";
}
else
{
cout<<"foocking hell, dont break a hip grandpa";
}
return 0;
} |
|
|
|
|
|
#4 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
|
|
|
|
|
|
#5 |
|
Newbie
Join Date: Sep 2004
Posts: 15
Rep Power: 0
![]() |
Ooble helped me fix it, Thanks.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|